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:
aleclarsoniv
2016-03-15 04:15:59 -07:00
committed by Facebook Github Bot 8
parent 6481e0ea6a
commit 64a09feaf7
6 changed files with 32 additions and 6 deletions

View File

@@ -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.
*/