File tree Expand file tree Collapse file tree 1 file changed +13
-14
lines changed Expand file tree Collapse file tree 1 file changed +13
-14
lines changed Original file line number Diff line number Diff line change @@ -15,41 +15,40 @@ export const Text = (props: TextProps) => {
15
15
return < TextElement as = { variant } { ...props } /> ;
16
16
} ;
17
17
18
-
19
18
const variantMapping = {
20
19
h1 : {
21
20
fontSize : "2em" ,
22
- fontWeight : 700
21
+ fontWeight : 700 ,
23
22
} ,
24
23
h2 : {
25
24
fontSize : "1.5em" ,
26
- fontWeight : 600
25
+ fontWeight : 600 ,
27
26
} ,
28
27
h3 : {
29
28
fontSize : "1.17em" ,
30
- fontWeight : 600
29
+ fontWeight : 600 ,
31
30
} ,
32
31
h4 : {
33
32
fontSize : "1em" ,
34
- fontWeight : 500
33
+ fontWeight : 500 ,
35
34
} ,
36
35
h5 : {
37
36
fontSize : "0.83em" ,
38
- fontWeight : 500
37
+ fontWeight : 500 ,
39
38
} ,
40
39
h6 : {
41
40
fontSize : "0.67em" ,
42
- fontWeight : 500
41
+ fontWeight : 500 ,
43
42
} ,
44
43
p : {
45
44
fontSize : "1em" ,
46
- fontWeight : 400
47
- }
45
+ fontWeight : 400 ,
46
+ } ,
48
47
} ;
49
48
50
49
const TextElement = styled . p < TextProps > `
51
- font-family: "Poppins", sans-serif;
52
- font-weight: ${ ( props ) => variantMapping [ props . variant ?? "p" ] . fontWeight } ;
53
- font-size: ${ ( props ) => variantMapping [ props . variant ?? "p" ] . fontSize } ;
54
- color: ${ ( props ) => props . theme . text } ;
55
- `;
50
+ font-family: "Poppins", sans-serif;
51
+ font-weight: ${ ( props ) => variantMapping [ props . variant ?? "p" ] . fontWeight } ;
52
+ font-size: ${ ( props ) => variantMapping [ props . variant ?? "p" ] . fontSize } ;
53
+ color: ${ ( props ) => props . theme . text } ;
54
+ ` ;
You can’t perform that action at this time.
0 commit comments