Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
seyaobey opened this issue Sep 26, 2019 · 7 comments
Closed

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

seyaobey opened this issue Sep 26, 2019 · 7 comments

Comments

@seyaobey
Copy link

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.

@GustavoBlaze
Copy link

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

@palingheorghe
Copy link
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
Copy link

presola commented Oct 7, 2019

this is also the same for Text and Block components

@AbdurRehman26
Copy link

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

@AbdurRehman26
Copy link

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
Copy link
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
Copy link
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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants