Skip to content
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

Add Icon as a primitive? #77

Open
ekryski opened this issue Jul 10, 2017 · 3 comments
Open

Add Icon as a primitive? #77

ekryski opened this issue Jul 10, 2017 · 3 comments

Comments

@ekryski
Copy link

ekryski commented Jul 10, 2017

Another primitive I see missing is Icon. Icons might be able to be shoehorned into Text or Image primitives however I think that would just muddy them both up.

This one might actually be a bit tricky due to the need to include external fonts. Specifically on React Native requiring a native module when using react-native-vector-icons.

Curious to hear your thoughts on this one @lelandrichardson.

@jjant
Copy link

jjant commented Jul 11, 2017

I'm curious on why wouldn't you just implement it using the Image primitive.

@ekryski
Copy link
Author

ekryski commented Jul 23, 2017

Fair point, if your icon actually is an image. However, icons as fonts are much easier to style and scale and are smaller in size.

I guess, technically you could use the Text primitive as well if it is a font. The trick though is how things are loaded on different platforms, specifically when using fonts.

@ktj
Copy link

ktj commented Sep 12, 2017

I think using https://github.com/chengyin/react-primitives-svg could solve your problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants