diff --git a/packages/react/src/Grid/Grid.tsx b/packages/react/src/Grid/Grid.tsx index f0b8227dee..1bd23eb7c5 100644 --- a/packages/react/src/Grid/Grid.tsx +++ b/packages/react/src/Grid/Grid.tsx @@ -10,7 +10,11 @@ import { GridCell } from './GridCell' import { paddingClasses } from './paddingClasses' export type GridColumnNumber = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 -export type GridColumnNumbers = { narrow: GridColumnNumber; medium: GridColumnNumber; wide: GridColumnNumber } +export type GridColumnNumbers = { + narrow: 1 | 2 | 3 | 4 + medium: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 + wide: GridColumnNumber +} export type GridPaddingSize = 'small' | 'medium' | 'large' type GridPaddingVerticalProp = { diff --git a/packages/react/src/Grid/gridCellClasses.ts b/packages/react/src/Grid/gridCellClasses.ts index 43dbe55c15..056d132b83 100644 --- a/packages/react/src/Grid/gridCellClasses.ts +++ b/packages/react/src/Grid/gridCellClasses.ts @@ -3,12 +3,10 @@ * Copyright Gemeente Amsterdam */ +import type { GridColumnNumber, GridColumnNumbers } from './Grid' import type { GridCellProps } from './GridCell' -export const addGridClass = ( - prefix: string, - value?: number | { narrow: number; medium: number; wide: number } | 'all', -): string[] => { +export const addGridClass = (prefix: string, value?: GridColumnNumber | GridColumnNumbers | 'all'): string[] => { if (value === 'all' || typeof value === 'number') { return [`${prefix}${value}`] } else if (value) { diff --git a/packages/react/src/Grid/index.ts b/packages/react/src/Grid/index.ts index 0d8979c3b0..4cd42ca193 100644 --- a/packages/react/src/Grid/index.ts +++ b/packages/react/src/Grid/index.ts @@ -1,3 +1,3 @@ export { Grid } from './Grid' -export type { GridProps, GridColumnNumber, GridColumnNumbers } from './Grid' +export type { GridColumnNumber, GridColumnNumbers, GridProps } from './Grid' export type { GridCellProps } from './GridCell'