theme en cours
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user