mirror of
https://github.com/status-im/react-native.git
synced 2025-01-14 11:34:23 +00:00
attributes for setting alignment in SGText
Reviewed By: kukulski Differential Revision: D2483597 fb-gh-sync-id: 003592b55b98af7a350f4789f3199b4e6d5f2c22
This commit is contained in:
parent
0e2f3672c5
commit
385ac02aeb
@ -56,6 +56,7 @@ typedef NSURL RCTFileURL;
|
||||
+ (NSTimeZone *)NSTimeZone:(id)json;
|
||||
+ (NSTimeInterval)NSTimeInterval:(id)json;
|
||||
|
||||
+ (NSLineBreakMode)NSLineBreakMode:(id)json;
|
||||
+ (NSTextAlignment)NSTextAlignment:(id)json;
|
||||
+ (NSUnderlineStyle)NSUnderlineStyle:(id)json;
|
||||
+ (NSWritingDirection)NSWritingDirection:(id)json;
|
||||
|
@ -205,6 +205,15 @@ NSNumber *RCTConvertMultiEnumValue(const char *typeName, NSDictionary *mapping,
|
||||
return RCTConvertEnumValue(typeName, mapping, defaultValue, json);
|
||||
}
|
||||
|
||||
RCT_ENUM_CONVERTER(NSLineBreakMode, (@{
|
||||
@"wordWrapping": @(NSLineBreakByWordWrapping),
|
||||
@"charWrapping": @(NSLineBreakByCharWrapping),
|
||||
@"clipping": @(NSLineBreakByClipping),
|
||||
@"truncatingHead": @(NSLineBreakByTruncatingHead),
|
||||
@"truncatingTail": @(NSLineBreakByTruncatingTail),
|
||||
@"truncatingMiddle": @(NSLineBreakByTruncatingMiddle),
|
||||
}), NSLineBreakByWordWrapping, integerValue)
|
||||
|
||||
RCT_ENUM_CONVERTER(NSTextAlignment, (@{
|
||||
@"auto": @(NSTextAlignmentNatural),
|
||||
@"left": @(NSTextAlignmentLeft),
|
||||
|
Loading…
x
Reference in New Issue
Block a user