diff options
| author | Alberto Duarte Delgado <alberto@albertoduarte.com> | 2026-03-25 15:32:20 +0000 |
|---|---|---|
| committer | Alberto Duarte Delgado <alberto@albertoduarte.com> | 2026-03-25 15:32:20 +0000 |
| commit | 7809ccbba56be8c5377f94cf2d287a0e1521fdc1 (patch) | |
| tree | 1c590049df5546f141eeb3bf58ad5ea9d1e0fbf6 /components/themed-text.tsx | |
| parent | d071a19fdeb0fc369e356004118f59a7fe4fed91 (diff) | |
Initial commit: App Oficina base project
Diffstat (limited to 'components/themed-text.tsx')
| -rw-r--r-- | components/themed-text.tsx | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/components/themed-text.tsx b/components/themed-text.tsx deleted file mode 100644 index d79d0a1..0000000 --- a/components/themed-text.tsx +++ /dev/null @@ -1,60 +0,0 @@ -import { StyleSheet, Text, type TextProps } from 'react-native'; - -import { useThemeColor } from '@/hooks/use-theme-color'; - -export type ThemedTextProps = TextProps & { - lightColor?: string; - darkColor?: string; - type?: 'default' | 'title' | 'defaultSemiBold' | 'subtitle' | 'link'; -}; - -export function ThemedText({ - style, - lightColor, - darkColor, - type = 'default', - ...rest -}: ThemedTextProps) { - const color = useThemeColor({ light: lightColor, dark: darkColor }, 'text'); - - return ( - <Text - style={[ - { color }, - type === 'default' ? styles.default : undefined, - type === 'title' ? styles.title : undefined, - type === 'defaultSemiBold' ? styles.defaultSemiBold : undefined, - type === 'subtitle' ? styles.subtitle : undefined, - type === 'link' ? styles.link : undefined, - style, - ]} - {...rest} - /> - ); -} - -const styles = StyleSheet.create({ - default: { - fontSize: 16, - lineHeight: 24, - }, - defaultSemiBold: { - fontSize: 16, - lineHeight: 24, - fontWeight: '600', - }, - title: { - fontSize: 32, - fontWeight: 'bold', - lineHeight: 32, - }, - subtitle: { - fontSize: 20, - fontWeight: 'bold', - }, - link: { - lineHeight: 30, - fontSize: 16, - color: '#0a7ea4', - }, -}); |