I have an icon that contains company logo and next to this logo should be displayed counter, I have created a component on https://react-svgr.com/ and I tried to use Text Svg element like so
import Svg, { Path, Text} from "react-native-svg";import type { IconProps } from "./iconpropsType";<Svg width={54} height={36} fill="none" {...props}><Path d="company logo" fill={props.iconColor} /><Text fill={props.iconColor}>7</Text></Svg>
but I'm getting and error that says
Type '{ children: string; fill: Color; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Component<TextProps, any, any>> & Readonly<TextProps>'. Property 'children' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<Component<TextProps, any, any>> & Readonly<TextProps>'.ts(2322)
according to MDN this should be a valid use of SVG text element https://developer.mozilla.org/en-US/docs/Web/SVG/Element/text and indeed the text gets rendered, but there is no children prop in TextProps.What is the proper usage of Text element in React SVGR? The docs do net get into details of elements too much
Thanks