mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-03-30 17:33:21 +08:00
Added support for textDecorationLine style prop on Android
Summary:As suggested by kmagiera in #3819, I've implemented `textDecorationLine` style for Android in `ReactTextShadowNode` using span operations so we can support nested Text components.  Closes https://github.com/facebook/react-native/pull/5105 Differential Revision: D3167756 Pulled By: andreicoman11 fb-gh-sync-id: 122701a53d50f47f89b49e1f343c97db5fa2323d fbshipit-source-id: 122701a53d50f47f89b49e1f343c97db5fa2323d
This commit is contained in:
committed by
Facebook Github Bot 9
parent
eac617d6ee
commit
2039be9d32
@@ -215,6 +215,23 @@ var TextExample = React.createClass({
|
||||
Move fast and be bold
|
||||
</Text>
|
||||
</UIExplorerBlock>
|
||||
<UIExplorerBlock title="Text Decoration">
|
||||
<Text style={{textDecorationLine: 'underline'}}>
|
||||
Solid underline
|
||||
</Text>
|
||||
<Text style={{textDecorationLine: 'none'}}>
|
||||
None textDecoration
|
||||
</Text>
|
||||
<Text style={{textDecorationLine: 'line-through', textDecorationStyle: 'solid'}}>
|
||||
Solid line-through
|
||||
</Text>
|
||||
<Text style={{textDecorationLine: 'underline line-through'}}>
|
||||
Both underline and line-through
|
||||
</Text>
|
||||
<Text>
|
||||
Mixed text with <Text style={{textDecorationLine: 'underline'}}>underline</Text> and <Text style={{textDecorationLine: 'line-through'}}>line-through</Text> text nodes
|
||||
</Text>
|
||||
</UIExplorerBlock>
|
||||
<UIExplorerBlock title="Nested">
|
||||
<Text onPress={() => console.log('1st')}>
|
||||
(Normal text,
|
||||
|
||||
Reference in New Issue
Block a user