mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-01 09:23:16 +08:00
Add 'props.lineBreakMode' to Text
Summary:I've tested this manually, but I'm not sure how to write a test for this. Hopefully someone can help out there. The least I could do is provide a starting point for a PR to be accepted. Additionally, I've renamed the existing `NSLineBreakMode` enum converter (inside `RCTConvert`) to use dashes in the names instead of camelcase (eg: `word-wrapping` instead of `wordWrapping`). Fixes #6338 Closes https://github.com/facebook/react-native/pull/6339 Differential Revision: D3052391 Pulled By: nicklockwood fb-gh-sync-id: 1536dfc139d7995095e9ee9d5f13ca86f90783c5 shipit-source-id: 1536dfc139d7995095e9ee9d5f13ca86f90783c5
This commit is contained in:
committed by
Facebook Github Bot 8
parent
6481e0ea6a
commit
64a09feaf7
@@ -40,6 +40,17 @@ var TextStylePropTypes = Object.assign(Object.create(ViewStylePropTypes), {
|
||||
*/
|
||||
letterSpacing: ReactPropTypes.number,
|
||||
lineHeight: ReactPropTypes.number,
|
||||
/**
|
||||
* @platform ios
|
||||
*/
|
||||
lineBreakMode: ReactPropTypes.oneOf([
|
||||
'clipping',
|
||||
'word-wrapping',
|
||||
'char-wrapping',
|
||||
'truncating-head',
|
||||
'truncating-middle',
|
||||
'truncating-tail',
|
||||
]),
|
||||
/**
|
||||
* Specifies text alignment. The value 'justify' is only supported on iOS.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user