mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 04:16:00 +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
@@ -231,12 +231,12 @@ NSNumber *RCTConvertMultiEnumValue(const char *typeName, NSDictionary *mapping,
|
||||
}
|
||||
|
||||
RCT_ENUM_CONVERTER(NSLineBreakMode, (@{
|
||||
@"wordWrapping": @(NSLineBreakByWordWrapping),
|
||||
@"charWrapping": @(NSLineBreakByCharWrapping),
|
||||
@"clipping": @(NSLineBreakByClipping),
|
||||
@"truncatingHead": @(NSLineBreakByTruncatingHead),
|
||||
@"truncatingTail": @(NSLineBreakByTruncatingTail),
|
||||
@"truncatingMiddle": @(NSLineBreakByTruncatingMiddle),
|
||||
@"word-wrapping": @(NSLineBreakByWordWrapping),
|
||||
@"char-wrapping": @(NSLineBreakByCharWrapping),
|
||||
@"truncating-head": @(NSLineBreakByTruncatingHead),
|
||||
@"truncating-middle": @(NSLineBreakByTruncatingMiddle),
|
||||
@"truncating-tail": @(NSLineBreakByTruncatingTail),
|
||||
}), NSLineBreakByWordWrapping, integerValue)
|
||||
|
||||
RCT_ENUM_CONVERTER(NSTextAlignment, (@{
|
||||
|
||||
Reference in New Issue
Block a user