-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Svg Icons Component #21
Comments
Same as this? https://github.com/danawoodman/react-fontawesome |
That one isn't SVG, it requires you load the fonts still. I was thinking something like this: import Folder from './Folder.js';
const Icon= ({ name, size }) => <svg width={size + 'px'} height={size+'xp'}> {name === 'Folder' &&<Folder />}</svg> Folder.js would have just the svg path: expect default ({ color }) => <path h='.....' fill={color} /> usage: import Icon from 'quran-component/lib/Icon';
...
return ( <Icon name='Folder' size='30' />) |
Ah! nice :) Check this out too: https://github.com/oblador/react-native-vector-icons |
found the perfect one: https://github.com/gorangajic/react-icons |
Oh yeah... not sure how i forgot about this... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I read an interesting article. Since we use font-awesome, we can get the the svg files from https://github.com/encharm/Font-Awesome-SVG-PNG/tree/master/black/svg and make them into simple React component.
Benefits:
thoughts?
The text was updated successfully, but these errors were encountered: