theme en cours

This commit is contained in:
trochas
2025-11-06 18:46:32 +01:00
parent 170ac974c2
commit 73eb7b416a
11 changed files with 186 additions and 87 deletions

View File

@@ -5,6 +5,7 @@ import { useThemeColor } from '@/hooks/use-theme-color';
export type ThemedTextProps = TextProps & {
lightColor?: string;
darkColor?: string;
reverse?:boolean;
type?: 'default' | 'title' | 'defaultSemiBold' | 'subtitle' | 'link';
};
@@ -12,10 +13,17 @@ export function ThemedText({
style,
lightColor,
darkColor,
reverse,
type = 'default',
...rest
}: ThemedTextProps) {
const color = useThemeColor({ light: lightColor, dark: darkColor }, 'text');
var text:string = 'text'
if(reverse){
text += '_';
}
const color = useThemeColor({ light: lightColor, dark: darkColor }, text as 'text'|'text_');
return (
<Text