frontend client for gemstone. decentralised workplace app
at main 939 B view raw
1import { useFacet } from "@/lib/facet"; 2import { useCurrentPalette } from "@/providers/ThemeProvider"; 3import type { ReactNode } from "react"; 4import type { StyleProp, TextStyle } from "react-native"; 5// eslint-disable-next-line no-restricted-imports -- This is the component in question. We are re-exporting RN's base text component. 6import { Text as RnText } from "react-native"; 7 8export const Text = ({ 9 children, 10 style, 11 ...props 12}: { 13 children: ReactNode; 14 style?: StyleProp<TextStyle>; 15}) => { 16 const { typography } = useFacet(); 17 const { semantic } = useCurrentPalette(); 18 19 return ( 20 <RnText 21 {...props} 22 style={[ 23 { 24 fontWeight: 300, 25 color: semantic.text, 26 }, 27 typography.weights.byName.light, 28 style, 29 ]} 30 > 31 {children} 32 </RnText> 33 ); 34};