gluestack / gluestack-ui

React & React Native Components & Patterns (copy-paste components & patterns crafted with Tailwind CSS (NativeWind))
https://gluestack.io/
MIT License
2.73k stars 120 forks source link

Icons components with Lucide and rect shape doesn't display correctly on web #1821

Open Ocleos opened 8 months ago

Ocleos commented 8 months ago

Description

When we use a lucide icon with a rect shape inside (ex : Cpu, Lock, Shapes, ...) in the "as" prop of the Icon component, the icon isn't displayed correctly on web platform.

CodeSandbox/Snack link

No response

Steps to reproduce

Exemple to reproduce the issue :

import { HStack, Icon } from '@gluestack-ui/themed';
import { Cpu, Shapes, Wrench } from 'lucide-react-native';

const IconsComponent: React.FC = () => {

  return (
    <HStack gap='$2'>
      <Icon as={Shapes} size='xl' color='$white' />
      <Shapes size={24} color='#FFFFFF' />
      <Icon as={Cpu} size='xl' color='$white' />
      <Cpu size={24} color='#FFFFFF' />
      <Icon as={Wrench} size='xl' color='$white' />
      <Wrench size={24} color='#FFFFFF' />
    </HStack>
  );
};

export default IconsComponent;

image

gluestack-ui Version

1.1.8

Platform

Other Platform

No response

Additional Information

Observations

Dependencies Versions

akash3gtm commented 8 months ago

hi @Ocleos thank you for reporting, we are looking into it.

akash3gtm commented 8 months ago

hi @Ocleos , Issue has been found, will be resolved in the next update and will comment here also.

akash3gtm commented 8 months ago

hi @Ocleos For now, please use the numerical values only. It will be fixed in the next update.

Jelmerovereem commented 6 months ago

When will this be fixed? And is there a workaround for now?