diff --git a/packages/ffe-grid-react/src/GridCol.tsx b/packages/ffe-grid-react/src/GridCol.tsx index 4e1b623684..7f7276e3c8 100644 --- a/packages/ffe-grid-react/src/GridCol.tsx +++ b/packages/ffe-grid-react/src/GridCol.tsx @@ -4,43 +4,9 @@ import { BackgroundColor, BackgroundColorDark, ComponentWithoutRefAsPropParams, + SizeModifier, } from './types'; -type ColumnsRange = - | 0 - | 1 - | 2 - | 3 - | 4 - | 5 - | 6 - | 7 - | 8 - | 9 - | 10 - | 11 - | 12 - | '0' - | '1' - | '2' - | '3' - | '4' - | '5' - | '6' - | '7' - | '8' - | '9' - | '10' - | '11' - | '12'; - -interface GridColSize { - cols: ColumnsRange; - offset?: ColumnsRange; -} - -type SizeModifier = ColumnsRange | GridColSize; - export type GridColProps = ComponentWithoutRefAsPropParams & { /** Supported background colors */ diff --git a/packages/ffe-grid-react/src/types.ts b/packages/ffe-grid-react/src/types.ts index 062ac9c5dc..e6889be445 100644 --- a/packages/ffe-grid-react/src/types.ts +++ b/packages/ffe-grid-react/src/types.ts @@ -52,3 +52,38 @@ export type BackgroundColor = | 'hvit'; export type BackgroundColorDark = 'svart' | 'natt' | 'koksgraa'; + +type ColumnsRange = + | 0 + | 1 + | 2 + | 3 + | 4 + | 5 + | 6 + | 7 + | 8 + | 9 + | 10 + | 11 + | 12 + | '0' + | '1' + | '2' + | '3' + | '4' + | '5' + | '6' + | '7' + | '8' + | '9' + | '10' + | '11' + | '12'; + +interface GridColSize { + cols: ColumnsRange; + offset?: ColumnsRange; +} + +export type SizeModifier = ColumnsRange | GridColSize;