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

It is giving error that text field must be inside the text component and when i add the text in text component it does not takes the styling from LinearTextGradient #59

Open
shivams10 opened this issue Jun 5, 2023 · 4 comments

Comments

@shivams10
Copy link

I m tring this in my android studio.

@shivams10 shivams10 changed the title It is giving error that text field must be inside the text component and when i add the text in text component it does not takes the styling from linear text gradient It is giving error that text field must be inside the text component and when i add the text in text component it does not takes the styling from LinearTextGradient Jun 5, 2023
@acarkaan
Copy link

same error

@shivams10
Copy link
Author

@acarkaan , you can use MaskedView from '@react-native-masked-view/masked-view' it worked for me.

@acarkaan
Copy link

@acarkaan , you can use MaskedView from '@react-native-masked-view/masked-view' it worked for me.

Thank you very much i will use this package too.

@waleedauthornate
Copy link

The most simple way to to avoid this issue is that
<LinearTextGradient
style={{fontWeight: 'bold', fontSize: 72}}
locations={[0, 1]}
colors={['red', 'blue']}
start={{x: 0, y: 0}}
end={{x: 1, y: 0}}>
Hello World</Title>

Just enclose the string/text in and apply the styling on that just not the color adjust the color through
<><><><><><><>
<LinearTextGradient
style={{fontWeight: 'bold', fontSize: 72}}
locations={[0, 1]}
colors={['red', 'blue']}
start={{x: 0, y: 0}}
end={{x: 1, y: 0}}>
<><><><><><><>

The above part!

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

3 participants