mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Add RNTester example for multi-line interleaved <View> and <Text> (#28242)
Summary: Currently, using `alignSelf: "baseline"` on a `<View>` nested in a `<Text>` fails to position the view properly. Using `alignItems: "baseline"` on the parent `<Text>` doesn't work either. /cc shergin ### Current Result  ### Expected Result  Pull Request resolved: https://github.com/facebook/react-native/pull/28242 Reviewed By: PeteTheHeat Differential Revision: D20308202 Pulled By: shergin fbshipit-source-id: adb75b763db1c3e879cb90d469a80ee8262a3609
This commit is contained in:
committed by
Facebook Github Bot
parent
07c4980267
commit
37436752f5
@@ -318,6 +318,23 @@ class TextBaseLineLayoutExample extends React.Component<*, *> {
|
||||
{marker}
|
||||
</View>
|
||||
|
||||
<Text style={subtitleStyle}>
|
||||
{'Multi-line interleaved <View> and <Text>:'}
|
||||
</Text>
|
||||
<View style={{flexDirection: 'row', alignItems: 'baseline'}}>
|
||||
<Text selectable={true}>
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris
|
||||
venenatis,{' '}
|
||||
<View
|
||||
style={{
|
||||
backgroundColor: 'yellow',
|
||||
}}>
|
||||
<Text>mauris eu commodo maximus</Text>
|
||||
</View>{' '}
|
||||
, ante arcu vestibulum ligula, et scelerisque diam.
|
||||
</Text>
|
||||
</View>
|
||||
|
||||
<Text style={subtitleStyle}>{'<TextInput/>:'}</Text>
|
||||
<View style={{flexDirection: 'row', alignItems: 'baseline'}}>
|
||||
{marker}
|
||||
|
||||
Reference in New Issue
Block a user