SrBrahma / react-native-shadow-2

Cross-platform shadow for React Native. Supports Android, iOS, Web, and Expo
MIT License
674 stars 56 forks source link

Draw a shadow around an svg #84

Closed RobinBobin closed 1 week ago

RobinBobin commented 2 months ago

Hi, Is it possible to use your package to draw a shadow around an SvgXml from react-native-svg?

<Shadow>
  <SvgXml
    xml={`
    <svg height='100%' width='100%'>
      <rect fill='yellow' height='50%' width='50%' x='25%' y='25%' />
    </svg>
  `}
  />
</Shadow>

results in the svg not displayed. <Shadow><Text ... /></Shadow> from the readme renders fine.

Thanks.

SrBrahma commented 2 months ago

Hi, I can not tell why this doesn't work. Maybe nested svgs in this way don't work. Maybe try to wrap the SVG with a view?

SrBrahma commented 1 week ago

Closing due to inactivity