mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-22 11:16:06 +08:00
change lineBreakMode to ellipsizeMode
Summary: lineBreakMode only in rc so I think we can replace property without any deprecation warnings. satya164 Closes https://github.com/facebook/react-native/pull/9008 Differential Revision: D3614901 fbshipit-source-id: 724227c0a89192825a24850b930b80884571a51f
This commit is contained in:
committed by
Facebook Github Bot 5
parent
d67258eb91
commit
857d2b8eae
@@ -400,14 +400,14 @@ var TextExample = React.createClass({
|
||||
Demo text shadow
|
||||
</Text>
|
||||
</UIExplorerBlock>
|
||||
<UIExplorerBlock title="Line break mode">
|
||||
<UIExplorerBlock title="Ellipsize mode">
|
||||
<Text numberOfLines={1}>
|
||||
This very long text should be truncated with dots in the end.
|
||||
</Text>
|
||||
<Text lineBreakMode="middle" numberOfLines={1}>
|
||||
<Text ellipsizeMode="middle" numberOfLines={1}>
|
||||
This very long text should be truncated with dots in the middle.
|
||||
</Text>
|
||||
<Text lineBreakMode="head" numberOfLines={1}>
|
||||
<Text ellipsizeMode="head" numberOfLines={1}>
|
||||
This very long text should be truncated with dots in the beginning.
|
||||
</Text>
|
||||
</UIExplorerBlock>
|
||||
|
||||
@@ -445,20 +445,20 @@ exports.examples = [
|
||||
);
|
||||
},
|
||||
}, {
|
||||
title: 'Line break mode',
|
||||
title: 'Ellipsize mode',
|
||||
render: function() {
|
||||
return (
|
||||
<View>
|
||||
<Text numberOfLines={1}>
|
||||
This very long text should be truncated with dots in the end.
|
||||
</Text>
|
||||
<Text lineBreakMode="middle" numberOfLines={1}>
|
||||
<Text ellipsizeMode="middle" numberOfLines={1}>
|
||||
This very long text should be truncated with dots in the middle.
|
||||
</Text>
|
||||
<Text lineBreakMode="head" numberOfLines={1}>
|
||||
<Text ellipsizeMode="head" numberOfLines={1}>
|
||||
This very long text should be truncated with dots in the beginning.
|
||||
</Text>
|
||||
<Text lineBreakMode="clip" numberOfLines={1}>
|
||||
<Text ellipsizeMode="clip" numberOfLines={1}>
|
||||
This very looooooooooooooooooooooooooooong text should be clipped.
|
||||
</Text>
|
||||
</View>
|
||||
|
||||
Reference in New Issue
Block a user