gluestack-ui icon indicating copy to clipboard operation
gluestack-ui copied to clipboard

Size prop is not working correctly in Icon component

Open quocluongha opened this issue 1 year ago • 1 comments
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

quocluongha avatar May 13 '24 10:05 quocluongha

I have a similar issue using expo 50 and gluestack 1.1.26. But only using Android simulator and I have the following error: Screenshot 2024-05-16 at 11 13 43

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

pierrebiver avatar May 16 '24 09:05 pierrebiver