@@ -11,9 +11,15 @@ import {
11
11
fontSizeMini ,
12
12
fontSizeSmall ,
13
13
fontSizeExtraSmall ,
14
+ fontWeightThin ,
15
+ fontWeightExtraLight ,
16
+ fontWeightLight ,
14
17
fontWeight ,
18
+ fontWeightMedium ,
19
+ fontWeightSemiBold ,
15
20
fontWeightBold ,
16
- fontWeightThin ,
21
+ fontWeightExtraBold ,
22
+ fontWeightBlack ,
17
23
} from '../style/font' ;
18
24
import colors from '../style/color' ;
19
25
@@ -25,12 +31,32 @@ const Text = ({ children, size, weight, color }) => {
25
31
fontWeight,
26
32
color : colors [ color ] ,
27
33
} ,
28
- bold : {
29
- fontWeight : fontWeightBold ,
34
+ // Weights
35
+ extraLight : {
36
+ fontWeight : fontWeightExtraLight ,
37
+ } ,
38
+ light : {
39
+ fontWeight : fontWeightLight ,
30
40
} ,
31
41
thin : {
32
42
fontWeight : fontWeightThin ,
33
43
} ,
44
+ medium : {
45
+ fontWeight : fontWeightMedium ,
46
+ } ,
47
+ semiBold : {
48
+ fontWeight : fontWeightSemiBold ,
49
+ } ,
50
+ bold : {
51
+ fontWeight : fontWeightBold ,
52
+ } ,
53
+ extraBold : {
54
+ fontWeight : fontWeightExtraBold ,
55
+ } ,
56
+ black : {
57
+ fontWeight : fontWeightBlack ,
58
+ } ,
59
+ // Sizes
34
60
extraSmall : {
35
61
fontSize : fontSizeExtraSmall ,
36
62
} ,
@@ -47,8 +73,16 @@ const Text = ({ children, size, weight, color }) => {
47
73
fontSize : fontSizeSmall ,
48
74
} ,
49
75
} , {
50
- bold : weight === 'bold' ,
76
+ // Weights
77
+ extraLight : weight === 'extra-light' ,
78
+ light : weight === 'light' ,
51
79
thin : weight === 'thin' ,
80
+ medium : weight === 'medium' ,
81
+ semiBold : weight === 'semi-bold' ,
82
+ bold : weight === 'bold' ,
83
+ extraBold : weight === 'extra-bold' ,
84
+ black : weight === 'black' ,
85
+ // Sizes
52
86
extraSmall : size === 'extra-small' ,
53
87
large : size === 'large' ,
54
88
extraLarge : size === 'extra-large' ,
@@ -63,7 +97,7 @@ const Text = ({ children, size, weight, color }) => {
63
97
Text . propTypes = {
64
98
children : PropTypes . node ,
65
99
size : PropTypes . oneOf ( [ 'extra-small' , 'large' , 'extra-large' , 'mini' , 'small' ] ) ,
66
- weight : PropTypes . oneOf ( [ 'bold ' , 'thin' ] ) ,
100
+ weight : PropTypes . oneOf ( [ 'extra-light ' , 'light' , ' thin' , 'medium' , 'semi-bold' , 'bold' , 'extra-bold' , 'black '] ) ,
67
101
color : PropTypes . oneOf ( Object . keys ( colors ) ) ,
68
102
} ;
69
103
0 commit comments