Replies: 2 comments
-
i have sprite.svg and inside a have a lot of icons |
Beta Was this translation helpful? Give feedback.
0 replies
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In my case i'm trying to generate icons from a srpite.svg file like this:
i have sprite.svg and inside a have a lot of icons
and i'm trying to generate this icon like this:
import { SvgXml } from 'react-native-svg';
import sprite from '../assets/icons/sprite.svg';
export const CustomeIcon = ({ name }) => {
return (
<SvgXml width={24} height={24} xml={sprite +
#${name}
}/>);
};
And like this:
import { Svg, Use } from 'react-native-svg';
import sprite from '../assets/icons/sprite.svg';
export const CustomeIcon = ({ name }) => {
return (
<Symbol fill="#000" ref={
${sprite}#${name}
} />);
};
And the same nothing work.
Can u help me, how i can do it using your library?
Beta Was this translation helpful? Give feedback.
All reactions