From b1e64a448a0be358f3cd97452ec306e455c6fb49 Mon Sep 17 00:00:00 2001 From: Valentin Shergin Date: Tue, 20 Jun 2017 17:12:54 -0700 Subject: [PATCH] Refined type for `display` style property Reviewed By: javache Differential Revision: D5185158 fbshipit-source-id: 02fef3862e20e9a5023bfe57601c3cf92ac273e5 --- Libraries/StyleSheet/LayoutPropTypes.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Libraries/StyleSheet/LayoutPropTypes.js b/Libraries/StyleSheet/LayoutPropTypes.js index 5da924e9563dea..e4ed43875c4abd 100644 --- a/Libraries/StyleSheet/LayoutPropTypes.js +++ b/Libraries/StyleSheet/LayoutPropTypes.js @@ -32,7 +32,10 @@ var LayoutPropTypes = { * It works similarly to `display` in CSS, but only support 'flex' and 'none'. * 'flex' is the default. */ - display: ReactPropTypes.string, + display: ReactPropTypes.oneOf([ + 'none', + 'flex', + ]), /** `width` sets the width of this component. *