File tree Expand file tree Collapse file tree
src/components/Typography Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ import {
1111 Subheading ,
1212 customText ,
1313 Title ,
14- Text as RNPText ,
1514} from 'react-native-paper' ;
1615
1716import { useExampleTheme } from '..' ;
@@ -106,17 +105,11 @@ const TextExample = () => {
106105 < Text style = { styles . text } variant = "bodySmall" >
107106 Body Small
108107 </ Text >
109-
110108 < PaperProvider theme = { theme } >
111109 < Text style = { styles . text } variant = "customVariant" >
112110 Custom Variant
113111 </ Text >
114112 </ PaperProvider >
115-
116- < RNPText style = { { color : 'red' } } >
117- < RNPText > Nested </ RNPText >
118- Text
119- </ RNPText >
120113 </ >
121114 ) }
122115 </ View >
Original file line number Diff line number Diff line change @@ -102,12 +102,12 @@ const Text = (
102102 let textStyle = [ font , style ] ;
103103
104104 if (
105- React . isValidElement ( rest . children ) &&
106- ( rest . children . type === Component ||
107- rest . children . type === AnimatedText ||
108- rest . children . type === StyledText )
105+ React . isValidElement ( children ) &&
106+ ( children . type === Component ||
107+ children . type === AnimatedText ||
108+ children . type === StyledText )
109109 ) {
110- const { props } = rest . children ;
110+ const { props } = children ;
111111
112112 // Context: Some components have the built-in `Text` component with a predefined variant,
113113 // that also accepts `children` as a `React.Node`. This can result in a situation,
You can’t perform that action at this time.
0 commit comments