mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-03-26 07:04:05 +08:00
[Text] Support "textAlign: justify" in Text components
Summary: Finished adding support for justified text on iOS... just had to expose a prop value. Fixes #529 Closes https://github.com/facebook/react-native/pull/1486 Github Author: James Ide <ide@jameside.com> Test Plan: View the Text example in the UIExplorer and see that all but the last lines of text in the justified text example are justified and extend to the far right of the available space. Tested on iOS 8, iPhone 6 simulator. 
This commit is contained in:
@@ -26,8 +26,9 @@ var TextStylePropTypes = Object.assign(Object.create(ViewStylePropTypes), {
|
||||
lineHeight: ReactPropTypes.number,
|
||||
color: ReactPropTypes.string,
|
||||
containerBackgroundColor: ReactPropTypes.string,
|
||||
// NOTE: "justify" is supported only on iOS
|
||||
textAlign: ReactPropTypes.oneOf(
|
||||
['auto' /*default*/, 'left', 'right', 'center']
|
||||
['auto' /*default*/, 'left', 'right', 'center', 'justify']
|
||||
),
|
||||
writingDirection: ReactPropTypes.oneOf(
|
||||
['auto' /*default*/, 'ltr', 'rtl']
|
||||
|
||||
Reference in New Issue
Block a user