From f9d222f8c3321f5d2e3b549c274412d3185a3b4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sinan=20Selboe=20Karag=C3=BClle?= Date: Mon, 10 Feb 2025 14:07:54 +0100 Subject: [PATCH] feat(ffe-grid-react): eksporter size modifier type --- packages/ffe-grid-react/src/GridCol.tsx | 36 +------------------------ packages/ffe-grid-react/src/types.ts | 35 ++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 35 deletions(-) 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;