From ff984ac9b55c9c1af50d5785863f5f36f92b62d2 Mon Sep 17 00:00:00 2001 From: Nick Gerleman Date: Mon, 5 Dec 2022 14:41:27 -0800 Subject: [PATCH] Move flex gap props to correct type Summary: Missed while reviewing https://github.com/facebook/react-native/pull/34974 that flex gap props in Flow typings were added to ShadowStyle instead of LayoutStyle (directly above). The same issue is not present in the TS typings. Changelog: [General][Fixed] - Move flex gap props to the correct type Reviewed By: yungsters Differential Revision: D41736652 fbshipit-source-id: de0db1676464fbd962b2c7e7e9ef62b795332f1b --- Libraries/StyleSheet/StyleSheetTypes.js | 26 ++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/Libraries/StyleSheet/StyleSheetTypes.js b/Libraries/StyleSheet/StyleSheetTypes.js index 6fd7ee822d1b26..d2f18a74024cc9 100644 --- a/Libraries/StyleSheet/StyleSheetTypes.js +++ b/Libraries/StyleSheet/StyleSheetTypes.js @@ -554,6 +554,19 @@ type ____LayoutStyle_Internal = $ReadOnly<{ * @platform ios */ direction?: 'inherit' | 'ltr' | 'rtl', + + /** + * In React Native, gap works the same way it does in CSS. + * If there are two or more children in a container, they will be separated from each other + * by the value of the gap - but the children will not be separated from the edges of their parent container. + * For horizontal gaps, use columnGap, for vertical gaps, use rowGap, and to apply both at the same time, it's gap. + * When align-content or justify-content are set to space-between or space-around, the separation + * between children may be larger than the gap value. + * See https://developer.mozilla.org/en-US/docs/Web/CSS/gap for more details. + */ + rowGap?: number, + columnGap?: number, + gap?: number, }>; /** @@ -590,19 +603,6 @@ export type ____ShadowStyle_InternalCore = $ReadOnly<{ * @platform ios */ shadowRadius?: number, - - /** - * In React Native, gap works the same way it does in CSS. - * If there are two or more children in a container, they will be separated from each other - * by the value of the gap - but the children will not be separated from the edges of their parent container. - * For horizontal gaps, use columnGap, for vertical gaps, use rowGap, and to apply both at the same time, it's gap. - * When align-content or justify-content are set to space-between or space-around, the separation - * between children may be larger than the gap value. - * See https://developer.mozilla.org/en-US/docs/Web/CSS/gap for more details. - */ - rowGap?: number, - columnGap?: number, - gap?: number, }>; export type ____ShadowStyle_Internal = $ReadOnly<{