Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

Multiple SVG icons as one component?

$
0
0

I can currently code SVGs in React-Native (typescript). This allows me to call them as individual react native components. Here's a made up example of what I can currently do:

<View><BackArrow          color ="red"         width = {10}         height = {10}    /></View>

However, what I want is to have an "Icon" type with a set few accepted names that output SVGs. This is an example of what I'd like to return that would give the same output:

<View><Icon     name = "backArrow"     color = "red"     width = {10}     height = {10}    /></View>

Is there any documentation available, or is there a way, to help me do this?


Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>