(
{ style, theme: overrideTheme, ...rest }: Props,
ref
)
| 27 | * @extends Text props https://reactnative.dev/docs/text#props |
| 28 | */ |
| 29 | const Text: React.ForwardRefRenderFunction<{}, Props> = ( |
| 30 | { style, theme: overrideTheme, ...rest }: Props, |
| 31 | ref |
| 32 | ) => { |
| 33 | const root = React.useRef<NativeText | null>(null); |
| 34 | const theme = useInternalTheme(overrideTheme); |
| 35 | |
| 36 | React.useImperativeHandle(ref, () => ({ |
| 37 | setNativeProps: (args: Object) => root.current?.setNativeProps(args), |
| 38 | })); |
| 39 | |
| 40 | return ( |
| 41 | <NativeText |
| 42 | {...rest} |
| 43 | ref={root} |
| 44 | style={[ |
| 45 | { |
| 46 | ...(!theme.isV3 && theme.fonts?.regular), |
| 47 | color: theme.isV3 ? theme.colors?.onSurface : theme.colors.text, |
| 48 | }, |
| 49 | styles.text, |
| 50 | style, |
| 51 | ]} |
| 52 | /> |
| 53 | ); |
| 54 | }; |
| 55 | |
| 56 | const styles = StyleSheet.create({ |
| 57 | text: { |
nothing calls this directly
no test coverage detected
searching dependent graphs…