gluestack-ui
gluestack-ui copied to clipboard
Size prop is not working correctly in Icon component
trafficstars
Description
Passing size prop to Icon component make the icon disappear
CodeSandbox/Snack link
https://snack.expo.dev/Ja0w3iTeXLUUttUht3FX3
Steps to reproduce
Add size prop to Icon component
gluestack-ui Version
1.1.26
Platform
- [X] Expo
- [X] React Native CLI
- [ ] Next
- [ ] Web
- [ ] Android
- [ ] iOS
Other Platform
No response
Additional Information
No response
I have a similar issue using expo 50 and gluestack 1.1.26. But only using Android simulator and I have the following error:
I tried to pass height and width instead and it seems to work. But will fail whenever I'm using the size property. This is how I use the icon in my code:
<Icon as={ChevronLeftIcon} size="2xl"/>
And I made another experiment, it works if I use the icons from lucide-react library, but not If I pass the as icon from the gluestack library