@@ -25,23 +25,17 @@ export function useLayout() {
2525 } ;
2626}
2727
28- const baseTextStyles = {
29- marginVertical : 0 ,
30- fontWeight : '400' as const ,
31- fontFamily : 'inherit' ,
32- } ;
33-
3428const textStyles = StyleSheet . create ( {
35- h1 : { ... baseTextStyles , fontSize : 57.25 , fontWeight : '600' as const } ,
36- h2 : { ... baseTextStyles , fontSize : 35.5 , fontWeight : '600' as const } ,
37- h3 : { ... baseTextStyles , fontSize : 26.5 , fontWeight : '600' as const } ,
38- h4 : { ... baseTextStyles , fontSize : 22 } ,
39- h5 : { ... baseTextStyles , fontSize : 20 } ,
40- h6 : { ... baseTextStyles , fontSize : 18 } ,
41- headline : { ... baseTextStyles , fontSize : 16 , fontWeight : '500' as const } ,
42- p : { ... baseTextStyles , fontSize : 16 } ,
43- caption : { ... baseTextStyles , fontSize : 15 , lineHeight : 22 } ,
44- label : { ... baseTextStyles , fontSize : 12 , fontWeight : '500' as const } ,
29+ h1 : tw `text-[ 57.25px] font-semibold` ,
30+ h2 : tw `text-[ 35.5px] font-semibold` ,
31+ h3 : tw `text-[ 26.5px] font-semibold` ,
32+ h4 : tw `text-[22px]` ,
33+ h5 : tw `text-[20px]` ,
34+ h6 : tw `text-[18px]` ,
35+ headline : tw `text-[16px] font-medium` ,
36+ p : tw `text-[16px]` ,
37+ caption : tw `text-[15px] leading-[22px]` ,
38+ label : tw `text-[12px] font-medium` ,
4539} ) ;
4640
4741type TextStyles = TextStyle | TextStyle [ ] ;
@@ -62,7 +56,12 @@ export function createTextComponent(Element: ComponentType<TextProps>, textStyle
6256 < Element
6357 id = { id }
6458 numberOfLines = { numberOfLines }
65- style = { [ elementStyle , textStyle , tw `text-black dark:text-white` , style ] } >
59+ style = { [
60+ tw `font-sans font-normal my-0 text-black dark:text-white` ,
61+ elementStyle as StyleProp < any > ,
62+ textStyle ,
63+ style ,
64+ ] } >
6665 { children }
6766 </ Element >
6867 ) ;
0 commit comments