Skip to content

Commit

Permalink
added gap type
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitmalhotra1420 committed Jul 11, 2024
1 parent 1c3c1dc commit 4bd4cdd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/blocks/Blocks.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ export type BlocksSpaceType =
| `${ThemeSpacing} ${ThemeSpacing}`
| `${ThemeSpacing} ${ThemeSpacing} ${ThemeSpacing} ${ThemeSpacing}`;

export type BlocksGapType = ThemeSpacing | `${ThemeSpacing} ${ThemeSpacing}`;

export type PixelValue = `${number}px`;

export type ValueOf<T> = T[keyof T];
Expand Down
3 changes: 2 additions & 1 deletion src/blocks/box/Box.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
ThemeModeBorder,
ThemeModeColors,
ValueOf,
BlocksGapType,
} from '../Blocks.types';
import { FlattenSimpleInterpolation } from 'styled-components';
import { ThemeColors } from 'blocks/theme/Theme.types';
Expand All @@ -21,7 +22,7 @@ export type BoxResponsiveProps = {
/* Sets flex-direction css property */
flexDirection?: ResponsiveProp<CSSProperties['flexDirection']>;
/* Sets gap between the elements */
gap?: ResponsiveProp<BlocksSpaceType>;
gap?: ResponsiveProp<BlocksGapType | BlocksSpaceType>;
/* Sets display css property */
display?: ResponsiveProp<CSSProperties['display']>;
/* Sets height css property */
Expand Down

0 comments on commit 4bd4cdd

Please sign in to comment.