-
Notifications
You must be signed in to change notification settings - Fork 83
/
Copy pathtypes.ts
89 lines (78 loc) · 1.4 KB
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
import { ComponentPropsWithoutRef, ElementType } from 'react';
export type DistributiveOmit<T, Omitted extends PropertyKey> = T extends any
? Omit<T, Omitted>
: never;
export type ComponentWithoutRefAsPropParams<As extends ElementType = any> = {
as?: As;
} & DistributiveOmit<
ComponentPropsWithoutRef<ElementType extends As ? 'div' : As>,
'as'
>;
export type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;
export type Margin =
| '2xs'
| 'xs'
| 'sm'
| 'md'
| 'lg'
| 'xl'
| '2xl'
| '3xl'
| '4xl'
| '5xl';
export type Padding =
| '2xs'
| 'xs'
| 'sm'
| 'md'
| 'lg'
| 'xl'
| '2xl'
| '3xl'
| '4xl'
| '5xl';
export type Gap = 'none' | '2xs' | 'xs' | 'sm' | 'md' | 'lg';
export type BackgroundColor =
| 'frost-30'
| 'sand'
| 'sand-70'
| 'sand-30'
| 'syrin-70'
| 'syrin-30'
| 'vann'
| 'vann-30'
| 'fjell'
| '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;