@@ -14,7 +14,17 @@ export interface HeaderTextProps extends TextProps {
1414const StyledText = styled ( Text ) < HeaderTextProps > (
1515 ( { theme, size = 2 , scale = 'sm' , monotype = false } ) => ( {
1616 fontWeight : monotype
17- ? theme . typography . fontWeight . regular
17+ ? matchSize (
18+ {
19+ 0 : theme . typography . fontWeight . bold ,
20+ 1 : theme . typography . fontWeight . bold ,
21+ 2 : theme . typography . fontWeight . bold ,
22+ 3 : theme . typography . fontWeight . regular ,
23+ 4 : theme . typography . fontWeight . regular ,
24+ 5 : theme . typography . fontWeight . regular ,
25+ } ,
26+ size ,
27+ )
1828 : matchSize (
1929 {
2030 0 : theme . typography . fontWeight . extraBold ,
@@ -24,7 +34,7 @@ const StyledText = styled(Text)<HeaderTextProps>(
2434 4 : theme . typography . fontWeight . semiBold ,
2535 5 : theme . typography . fontWeight . semiBold ,
2636 } ,
27- size
37+ size ,
2838 ) ,
2939 fontSize : matchSize (
3040 {
@@ -35,7 +45,7 @@ const StyledText = styled(Text)<HeaderTextProps>(
3545 sm : '1.75rem' ,
3646 xs : '1.5rem' ,
3747 } ,
38- scale
48+ scale ,
3949 ) ,
4050 lineHeight : matchSize (
4151 {
@@ -46,12 +56,12 @@ const StyledText = styled(Text)<HeaderTextProps>(
4656 sm : '2.5rem' ,
4757 xs : '1.75rem' ,
4858 } ,
49- scale
59+ scale ,
5060 ) ,
5161 '&:where(h1, h2, h3, h4, h5, h6)' : {
5262 margin : 0 ,
5363 } ,
54- } )
64+ } ) ,
5565) ;
5666
5767export function HeaderText ( props : HeaderTextProps ) {
0 commit comments