entria / react-native-fontawesome

React Native Font Awesome Icons
MIT License
176 stars 34 forks source link

Add platform specific handling of font files #37

Open noinfo opened 6 years ago

noinfo commented 6 years ago

Makes webfonts work in iOS and Android besides having to use different names in 'CSS' style.

sibelius commented 6 years ago

Can we make the user pass this as a prop instead? Having the default as the old value?

noinfo commented 6 years ago

Of course it’s technically possible but isn’t it rather clunky and unwieldy?

I mean the user would have to manually use a Platform.select whenever he uses an icon. That would make the whole thing go from easy and simple to use to quite cumbersome - it’s not even like the user could use it as is if he wants to support Android with his app he’ll have to set the prop on every single use - and with a platform.select and both possible values. Furthermore the user has to be taught which values he has to input. At that point it’s easier to just roll your own icon component...

sibelius commented 5 years ago

check if this helps https://github.com/entria/react-native-fontawesome/pull/61