remove code relating to Nesting of <View> within <Text>, which result… (#20558)
Summary: …s a crash in Text Example of RNTester. Thank you for sending the PR! We appreciate you spending the time to work on these changes. Help us understand your motivation by explaining why you decided to make this change. If this PR fixes an issue, type "Fixes #issueNumber" to automatically close the issue when the PR is merged. Pull Request resolved: https://github.com/facebook/react-native/pull/20558 Differential Revision: D9235009 Pulled By: hramos fbshipit-source-id: 23ed28f7c8b84f509d35ac0fe7aa72c183a9ab11
This commit is contained in:
parent
457a74cbc2
commit
03663491c6
|
@ -255,25 +255,6 @@ class TextBaseLineLayoutExample extends React.Component<*, *> {
|
|||
{marker}
|
||||
</View>
|
||||
|
||||
<Text style={subtitleStyle}>{'Interleaving <View> and <Text>:'}</Text>
|
||||
<View style={{flexDirection: 'row', alignItems: 'baseline'}}>
|
||||
{marker}
|
||||
<Text selectable={true}>
|
||||
Some text.
|
||||
<View
|
||||
style={{
|
||||
flexDirection: 'row',
|
||||
alignItems: 'baseline',
|
||||
backgroundColor: '#eee',
|
||||
}}>
|
||||
{marker}
|
||||
<Text>Text inside View.</Text>
|
||||
{marker}
|
||||
</View>
|
||||
</Text>
|
||||
{marker}
|
||||
</View>
|
||||
|
||||
<Text style={subtitleStyle}>{'<TextInput/>:'}</Text>
|
||||
<View style={{flexDirection: 'row', alignItems: 'baseline'}}>
|
||||
{marker}
|
||||
|
@ -750,26 +731,6 @@ exports.examples = [
|
|||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: 'Inline views',
|
||||
render: function() {
|
||||
return (
|
||||
<View>
|
||||
<Text>
|
||||
This text contains an inline blue view{' '}
|
||||
<View
|
||||
style={{width: 25, height: 25, backgroundColor: 'steelblue'}}
|
||||
/>{' '}
|
||||
and an inline image{' '}
|
||||
<Image
|
||||
source={require('./flux.png')}
|
||||
style={{width: 30, height: 11, resizeMode: 'cover'}}
|
||||
/>. Neat, huh?
|
||||
</Text>
|
||||
</View>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: 'Text shadow',
|
||||
render: function() {
|
||||
|
@ -843,31 +804,6 @@ exports.examples = [
|
|||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: 'Nested content',
|
||||
render: function() {
|
||||
return (
|
||||
<Text>
|
||||
This text has a view
|
||||
<View style={{borderColor: 'red', borderWidth: 1}}>
|
||||
<Text style={{borderColor: 'blue', borderWidth: 1}}>which has</Text>
|
||||
<Text style={{borderColor: 'green', borderWidth: 1}}>
|
||||
another text inside.
|
||||
</Text>
|
||||
<Text style={{borderColor: 'yellow', borderWidth: 1}}>
|
||||
And moreover, it has another view
|
||||
<View style={{borderColor: 'red', borderWidth: 1}}>
|
||||
<Text style={{borderColor: 'blue', borderWidth: 1}}>
|
||||
with another text inside!
|
||||
</Text>
|
||||
</View>
|
||||
</Text>
|
||||
</View>
|
||||
Because we need to go deeper.
|
||||
</Text>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: 'Dynamic Font Size Adjustment',
|
||||
render: function(): React.Element<any> {
|
||||
|
|
Loading…
Reference in New Issue