Skip to main content

Variable: Svg

const Svg: ForwardRefExoticComponent<object & ViewProps & object & RefAttributes<View>>

Defined in: packages/@mapples/ui/src/components/media/Svg/Svg.tsx:45

Renders inline SVG from a string (e.g. from @mapplesorg/figmafile GROUP→Svg conversion). Uses a data URI so react-native-svg's SvgUri can display it.

Example​

<Svg
content='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect x="0" y="0" width="100" height="100" fill="#333"/></svg>'
styled={{ style: { width: 100, height: 100 }, styleSvg: { width: 100, height: 100 } }}
/>