Skip to content

Commit a19fb1f

Browse files
committed
Fix fontWeight issue
1 parent 35f822b commit a19fb1f

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/utils/__tests__/text-style-to-typography.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ describe('textStyleToTypography', () => {
3131
['normal', 400],
3232
['Medium', 500],
3333
['Semibold', 600],
34+
['SemiBold', 600],
3435
['Bold', 700],
3536
['Extra Bold', 800],
3637
['Black', 900],

src/utils/text-style-to-typography.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ function getFontWeight(weight: string): number {
1818
switch (toCamel(weight)) {
1919
case 'thin':
2020
return 100
21+
case 'extralight':
2122
case 'extraLight':
2223
return 200
2324
case 'light':
@@ -28,9 +29,11 @@ function getFontWeight(weight: string): number {
2829
case 'medium':
2930
return 500
3031
case 'semibold':
32+
case 'semiBold':
3133
return 600
3234
case 'bold':
3335
return 700
36+
case 'extrabold':
3437
case 'extraBold':
3538
return 800
3639
case 'black':

0 commit comments

Comments
 (0)