-
-
Notifications
You must be signed in to change notification settings - Fork 102
/
Copy pathSvgIcon.css.ts
43 lines (39 loc) · 948 Bytes
/
SvgIcon.css.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
import {createVar, fallbackVar} from '@vanilla-extract/css';
import {recipe, RecipeVariants} from '@vanilla-extract/recipes';
import * as variables from '../../theme/variables.css';
export const inheritedWidth = createVar();
export const inheritedHeight = createVar();
export const svgIcon = recipe({
base: {
width: fallbackVar(inheritedWidth, fallbackVar(variables.fontSize, '20px')),
height: fallbackVar(
inheritedHeight,
fallbackVar(variables.fontSize, '20px'),
),
},
variants: {
size: {
'3x': {
width: '128px',
height: '128px',
},
lg: {
height: '26px',
width: '26px',
},
md: {
height: '20px',
width: '20px',
},
sm: {
width: '16px',
height: '16px',
},
xs: {
width: '14px',
height: '14px',
},
},
},
});
export type SvgIconProps = RecipeVariants<typeof svgIcon>;