Skip to content

Commit cb51518

Browse files
authored
Merge pull request #46 from grapp-dev/fix/export-props
fix: 🐛 Export all components props
2 parents 299106a + 2a45345 commit cb51518

File tree

8 files changed

+16
-16
lines changed

8 files changed

+16
-16
lines changed

src/components/Bleed.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ type BoxProps = Omit<
1717
| 'marginEnd'
1818
>;
1919

20-
type Props = BoxProps & {
20+
export type BleedProps = BoxProps & {
2121
readonly space?: ResponsiveProp<number>;
2222
readonly horizontal?: ResponsiveProp<number>;
2323
readonly vertical?: ResponsiveProp<number>;
@@ -29,7 +29,7 @@ type Props = BoxProps & {
2929
readonly end?: ResponsiveProp<number>;
3030
};
3131

32-
export const Bleed = (props: Props) => {
32+
export const Bleed = (props: BleedProps) => {
3333
const { children, space, horizontal, vertical, start, end, top, right, bottom, left, ...rest } =
3434
props;
3535

src/components/FloatBox.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ import { Box } from './Box';
77

88
type BoxProps = React.ComponentProps<typeof Box>;
99

10-
type Props = Omit<BoxProps, 'flex'> & {
10+
export type FloatBoxProps = Omit<BoxProps, 'flex'> & {
1111
readonly top?: ResponsiveProp<DimensionValue>;
1212
readonly right?: ResponsiveProp<DimensionValue>;
1313
readonly bottom?: ResponsiveProp<DimensionValue>;
1414
readonly left?: ResponsiveProp<DimensionValue>;
1515
readonly offset?: ResponsiveProp<DimensionValue>;
1616
};
1717

18-
export const FloatBox = (props: Props) => {
18+
export const FloatBox = (props: FloatBoxProps) => {
1919
const { children, top, right, bottom, left, offset, style, ...rest } = props;
2020

2121
const resolveResponsiveProp = useResponsiveProp();

src/components/Grid.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { makeWithIndex } from '../utils';
88
import { Box } from './Box';
99
import { FloatBox } from './FloatBox';
1010

11-
type Props = {
11+
export type GridProps = {
1212
readonly gutter?: ResponsiveProp<number>;
1313
readonly margin?: ResponsiveProp<number>;
1414
readonly columns?: ResponsiveProp<number>;
@@ -35,7 +35,7 @@ const calculateGridWidth = (options: Options) => {
3535
return options.width * columns + gutterCount * options.gutter + options.margin * 2;
3636
};
3737

38-
export const Grid = (props: Props) => {
38+
export const Grid = (props: GridProps) => {
3939
const { gutter = 2, margin = 2, opacity = 0.2, columns = 8, color = 'red' } = props;
4040

4141
const { multiply } = useSpacingHelpers();

src/components/Hidden.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ import * as React from 'react';
22

33
import type { Breakpoint } from '../types';
44

5-
type Props = React.PropsWithChildren<{
5+
export type HiddenProps = React.PropsWithChildren<{
66
readonly above?: Breakpoint;
77
readonly below?: Breakpoint;
88
}>;
99

10-
export const Hidden = (_props: Props): JSX.Element => {
10+
export const Hidden = (_props: HiddenProps): JSX.Element => {
1111
throw new Error(
1212
'[Stacks] Logical expression for the `Hidden` component could not be handled. Open a new issue and provide reproduction code.',
1313
);

src/components/Inline.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ type BoxProps = Omit<
99
'gap' | 'rowGap' | 'columnGap' | 'alignX' | 'alignY' | 'direction' | 'wrap'
1010
>;
1111

12-
type Props = BoxProps & {
12+
export type InlineProps = BoxProps & {
1313
readonly space?: ResponsiveProp<number>;
1414
readonly spaceX?: ResponsiveProp<number>;
1515
readonly spaceY?: ResponsiveProp<number>;
@@ -18,7 +18,7 @@ type Props = BoxProps & {
1818
readonly collapseBelow?: Breakpoint;
1919
};
2020

21-
export const Inline = (props: Props) => {
21+
export const Inline = (props: InlineProps) => {
2222
const { space, children, spaceX, spaceY, alignX, alignY, collapseBelow, ...rest } = props;
2323
const breakpoint = useBreakpointComparators();
2424

src/components/Inset.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ type BoxProps = Omit<
1616
| 'paddingEnd'
1717
>;
1818

19-
type Props = BoxProps & {
19+
export type InsetProps = BoxProps & {
2020
readonly space?: ResponsiveProp<number>;
2121
readonly horizontal?: ResponsiveProp<number>;
2222
readonly vertical?: ResponsiveProp<number>;
@@ -28,7 +28,7 @@ type Props = BoxProps & {
2828
readonly end?: ResponsiveProp<number>;
2929
};
3030

31-
export const Inset = (props: Props) => {
31+
export const Inset = (props: InsetProps) => {
3232
const { children, space, horizontal, vertical, start, end, top, right, bottom, left, ...rest } =
3333
props;
3434

src/components/Stack.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ type BoxProps = Omit<
1010
'direction' | 'alignX' | 'alignY' | 'rowGap' | 'columnGap'
1111
>;
1212

13-
type Props = BoxProps & {
13+
export type StackProps = BoxProps & {
1414
readonly space?: ResponsiveProp<number>;
1515
readonly horizontal?: ResponsiveProp<boolean>;
1616
readonly align?: ResponsiveProp<AxisX | AxisY>;
1717
readonly divider?: React.ReactElement;
1818
};
1919

20-
export const Stack = (props: Props) => {
20+
export const Stack = (props: StackProps) => {
2121
const { children, flex = 'content', space, horizontal, align, divider, ...rest } = props;
2222

2323
const resolveResponsiveProp = useResponsiveProp();

src/components/Tiles.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ type BoxProps = Omit<
1010
'gap' | 'rowGap' | 'columnGap' | 'direction' | 'alignX' | 'alignY'
1111
>;
1212

13-
type Props = BoxProps & {
13+
export type TilesProps = BoxProps & {
1414
readonly columns?: ResponsiveProp<number>;
1515
readonly space?: ResponsiveProp<number>;
1616
readonly spaceX?: ResponsiveProp<number>;
@@ -19,7 +19,7 @@ type Props = BoxProps & {
1919
readonly alignY?: ResponsiveProp<AxisY | Space>;
2020
};
2121

22-
export const Tiles = (props: Props) => {
22+
export const Tiles = (props: TilesProps) => {
2323
const { children, columns = 1, space, spaceX, spaceY, fill = false, reverse, ...rest } = props;
2424

2525
const resolveResponsiveProp = useResponsiveProp();

0 commit comments

Comments
 (0)