Skip to content

Card: ReferenceError: Can't find variable style #134

Closed
@seyaobey

Description

@seyaobey

Describe the bug
First time using the Galio framework (I am using it along with the argon template).
I am adding the Card component in my screen:

import { Card } from 'galio-framework';

...

<Card title={myTitle} />

Expected behavior
Card component should mount with any issue

But this is what I'm getting:

Screenshots
File_001

Smartphone (please complete the following information):

Additional context
I am using Galio with the Argon Template. (https://github.com/creativetimofficial/argon-react-native). I don't know if this error comes from the template.

Activity

GustavoBlaze

GustavoBlaze commented on Sep 29, 2019

@GustavoBlaze

It's happen with me too, and i'm use just the Galio

palingheorghe

palingheorghe commented on Sep 30, 2019

@palingheorghe
Collaborator

Hi @seyaobey @GustavoBlaze ! Thanks for pointing this out! This is a problem with our Card component which we need to solve asap. As far as I can see if you add the style prop and replace ...rest with ...props at the beginning of the function, everything is solved.

Thanks 🧜🏽‍♂️

presola

presola commented on Oct 7, 2019

@presola

this is also the same for Text and Block components

AbdurRehman26

AbdurRehman26 commented on Oct 7, 2019

@AbdurRehman26

I cant seem to pass dynamic image url to card as well. Anyone here has done it ?

AbdurRehman26

AbdurRehman26 commented on Oct 7, 2019

@AbdurRehman26

Hi @seyaobey @GustavoBlaze ! Thanks for pointing this out! This is a problem with our Card component which we need to solve asap. As far as I can see if you add the style prop and replace ...rest with ...props at the beginning of the function, everything is solved.

Thanks 🧜🏽‍♂️

Doing this works but for only static image paths. i can not pass a variable as prop for image

palingheorghe

palingheorghe commented on Oct 10, 2019

@palingheorghe
Collaborator

@presola the style prop should work as intended for the Block component. Text apparently has the same issue which can be solved by adding style in the prop section of the function in the text.js file of our component. We will solve this asap with the next hotfix.

@AbdurRehman26 I'm glad the fix worked! Could you please send a code snippet of the way you're adding the dynamic image please?

palingheorghe

palingheorghe commented on Oct 15, 2019

@palingheorghe
Collaborator

This specific issue should be solved now for Card and Text components. Release info for v0.6.3 Release info for v0.6.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Card: ReferenceError: Can't find variable style · Issue #134 · galio-org/galio