Skip to content

Commit 49f6836

Browse files
committed
feat(Flex): added row-gap responsive props
1 parent 2d58c8b commit 49f6836

File tree

3 files changed

+28
-2
lines changed

3 files changed

+28
-2
lines changed

apps/docs/src/stories/Layouts/Flex.story.vue

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
</pf-flex>
5757
</story-canvas>
5858

59-
<story-canvas title="Row gap">
59+
<story-canvas title="Gap">
6060
<pf-flex gap="2xl">
6161
<pf-flex-item>Flex item</pf-flex-item>
6262
<pf-flex-item>Flex item</pf-flex-item>
@@ -71,6 +71,21 @@
7171
</pf-flex>
7272
</story-canvas>
7373

74+
<story-canvas title="Row gap">
75+
<pf-flex row-gap="2xl">
76+
<pf-flex-item>Flex item</pf-flex-item>
77+
<pf-flex-item>Flex item</pf-flex-item>
78+
<pf-flex-item>Flex item</pf-flex-item>
79+
<pf-flex-item>Flex item</pf-flex-item>
80+
<pf-flex-item>Flex item</pf-flex-item>
81+
<pf-flex-item>Flex item</pf-flex-item>
82+
<pf-flex-item>Flex item</pf-flex-item>
83+
<pf-flex-item>Flex item</pf-flex-item>
84+
<pf-flex-item>Flex item</pf-flex-item>
85+
<pf-flex-item>Flex item</pf-flex-item>
86+
</pf-flex>
87+
</story-canvas>
88+
7489
<story-canvas title="Column gap">
7590
<pf-flex column-gap="2xl">
7691
<pf-flex-item>Flex item</pf-flex-item>

packages/core/src/breakpoints.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,15 @@ export type GapBreakpointProps = {
7979
gapXl2?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl';
8080
}
8181

82+
export type RowGapBreakpointProps = {
83+
rowGap?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl';
84+
rowGapSm?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl';
85+
rowGapMd?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl';
86+
rowGapLg?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl';
87+
rowGapXl?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl';
88+
rowGapXl2?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl';
89+
}
90+
8291
export type ColumnGapBreakpointProps = {
8392
columnGap?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl';
8493
columnGapSm?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl';

packages/core/src/layouts/Flex/Flex.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
'gap',
1313
'grow',
1414
'justifyContent',
15+
'rowGap',
1516
'shrink',
1617
'spaceItems',
1718
'spacer',
@@ -29,7 +30,7 @@
2930
import styles from '@patternfly/react-styles/css/layouts/Flex/flex';
3031
3132
import { classesFromBreakpointProps } from '../../breakpoints';
32-
import type { SpacerBreakpointProps, SpaceItemsBreakpointProps, GrowBreakpointProps, ShrinkBreakpointProps, FlexBreakpointProps, DirectionBreakpointProps, AlignItemsBreakpointProps, AlignContentBreakpointProps, AlignSelfBreakpointProps, AlignBreakpointProps, JustifyContentBreakpointProps, DisplayBreakpointProps, FullWidthBreakpointProps, FlexWrapBreakpointProps, GapBreakpointProps, ColumnGapBreakpointProps } from '../../breakpoints';
33+
import type { SpacerBreakpointProps, SpaceItemsBreakpointProps, GrowBreakpointProps, ShrinkBreakpointProps, FlexBreakpointProps, DirectionBreakpointProps, AlignItemsBreakpointProps, AlignContentBreakpointProps, AlignSelfBreakpointProps, AlignBreakpointProps, JustifyContentBreakpointProps, DisplayBreakpointProps, FullWidthBreakpointProps, FlexWrapBreakpointProps, GapBreakpointProps, RowGapBreakpointProps, ColumnGapBreakpointProps } from '../../breakpoints';
3334
import type { Component, HTMLAttributes } from 'vue';
3435
3536
defineOptions({
@@ -50,6 +51,7 @@ export interface Props extends
5051
GapBreakpointProps,
5152
GrowBreakpointProps,
5253
JustifyContentBreakpointProps,
54+
RowGapBreakpointProps,
5355
ShrinkBreakpointProps,
5456
SpaceItemsBreakpointProps,
5557
SpacerBreakpointProps,

0 commit comments

Comments
 (0)