Skip to content

Commit

Permalink
Move flex gap props to correct type
Browse files Browse the repository at this point in the history
Summary:
Missed while reviewing #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
  • Loading branch information
NickGerleman authored and facebook-github-bot committed Dec 5, 2022
1 parent 92a705b commit ff984ac
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions Libraries/StyleSheet/StyleSheetTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}>;

/**
Expand Down Expand Up @@ -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<{
Expand Down

0 comments on commit ff984ac

Please sign in to comment.