Added support of direction style property

Summary: Now layout direction (LTR or LTR) can be specified not only for whole app but also for view subtree via `direction` style property.

Reviewed By: mmmulani

Differential Revision: D4510206

fbshipit-source-id: 4e56c5886b6e42f2343165eb76be897e681c5ba4
This commit is contained in:
Valentin Shergin
2017-02-06 20:58:23 -08:00
committed by Facebook Github Bot
parent d73f7d3d5e
commit ec673d0771
14 changed files with 95 additions and 48 deletions

View File

@@ -470,6 +470,18 @@ var LayoutPropTypes = {
* more details.
*/
zIndex: ReactPropTypes.number,
/** `direction` specifies the directional flow of the user interface.
* The default is `inherit`, except for root node which will have
* value based on the current locale.
* See https://facebook.github.io/yoga/docs/rtl/
* for more details.
*/
direction: ReactPropTypes.oneOf([
'inherit',
'ltr',
'rtl',
]),
};
module.exports = LayoutPropTypes;