@@ -12,7 +12,67 @@ const SPACES = {
12
12
export type ValidSize = keyof typeof SPACES ;
13
13
14
14
/**
15
- * @deprecated prefer using `theme.space`
15
+ * @deprecated prefer `theme.space['2xs']`
16
+ */
17
+ function space < S extends 0.25 > ( size : S ) : ( typeof SPACES ) [ S ] ;
18
+ /**
19
+ * @deprecated prefer `theme.space.xs`
20
+ */
21
+ function space < S extends 0.5 > ( size : S ) : ( typeof SPACES ) [ S ] ;
22
+ /**
23
+ * @deprecated prefer `theme.space.sm`
24
+ */
25
+ function space < S extends 0.75 > ( size : S ) : ( typeof SPACES ) [ S ] ;
26
+ /**
27
+ * @deprecated prefer `theme.space.md`
28
+ */
29
+ function space < S extends 1 > ( size : S ) : ( typeof SPACES ) [ S ] ;
30
+ /**
31
+ * @deprecated prefer `theme.space.lg`
32
+ */
33
+ function space < S extends 1.5 > ( size : S ) : ( typeof SPACES ) [ S ] ;
34
+ /**
35
+ * @deprecated prefer `theme.space.xl`
36
+ */
37
+ function space < S extends 2 > ( size : S ) : ( typeof SPACES ) [ S ] ;
38
+ /**
39
+ * @deprecated prefer `theme.space['2xl']`
40
+ */
41
+ function space < S extends 3 > ( size : S ) : ( typeof SPACES ) [ S ] ;
42
+ /**
43
+ * @deprecated prefer `theme.space['3xl']`
44
+ */
45
+ function space < S extends 4 > ( size : S ) : ( typeof SPACES ) [ S ] ;
46
+ /**
47
+ * @deprecated replace with `theme.space.*` value from the
48
+ *
49
+ *
50
+ * | before | after | value |
51
+ * | ------ | ------ | -------------------- |
52
+ * | | `none` | `0px` (new!) |
53
+ * | `0.25` | `2xs` | `2px` |
54
+ * | `0.5` | `xs` | `4px` |
55
+ * | `0.75` | `sm` | `6px` |
56
+ * | `1` | `md` | `8px` |
57
+ * | `1.5` | `lg` | `12px` |
58
+ * | `2` | `xl` | `16px` |
59
+ * | `3` | `2xl` | `24px` (from `20px`) |
60
+ * | `4` | `3xl` | `32px` (from `30px`) |
61
+ */
62
+ function space < S extends ValidSize > ( size : S ) : ( typeof SPACES ) [ S ] ;
63
+ /**
64
+ * @deprecated replace with `theme.space.*`
65
+ * | before | after | value |
66
+ * | ------ | ------ | -------------------- |
67
+ * | | `none` | `0px` (new!) |
68
+ * | `0.25` | `2xs` | `2px` |
69
+ * | `0.5` | `xs` | `4px` |
70
+ * | `0.75` | `sm` | `6px` |
71
+ * | `1` | `md` | `8px` |
72
+ * | `1.5` | `lg` | `12px` |
73
+ * | `2` | `xl` | `16px` |
74
+ * | `3` | `2xl` | `24px` (from `20px`) |
75
+ * | `4` | `3xl` | `32px` (from `30px`) |
16
76
*/
17
77
function space < S extends ValidSize > ( size : S ) : ( typeof SPACES ) [ S ] {
18
78
return SPACES [ size ] ;
0 commit comments