fix: color does not work in dark mode

This commit is contained in:
Jakob Stornig 2023-12-05 15:07:45 +01:00
parent 498c1d8563
commit 9c319eeeda
3 changed files with 8 additions and 1 deletions

View file

@ -2,6 +2,7 @@ import { View, Text, ViewProps, Image, GestureResponderEvent } from 'react-nativ
import React from 'react'
import { MARGINS, SIZES, SHADOWS } from '../../../constants/theme'
import { TouchableOpacity } from 'react-native-gesture-handler'
import { useThemeColor } from '../../../hooks/hooks'
type WelcomeProps = ViewProps & {name: string, image : any, onPress: () => void | undefined}
@ -32,6 +33,8 @@ export default function Welcome(props: WelcomeProps) {
const timeOfDay = getTimeOfDay(date)
const onpress = props.onPress
const textcolor = useThemeColor("primaryText")
return (
<View style={{
marginVertical: 20,
@ -52,6 +55,7 @@ export default function Welcome(props: WelcomeProps) {
</TouchableOpacity>
<Text style={{
fontSize: SIZES.xlarge,
color: textcolor
}}>{dateString}</Text>
</View>
<View style={{
@ -59,6 +63,7 @@ export default function Welcome(props: WelcomeProps) {
}}>
<Text style={{
fontSize: SIZES.xlarge,
color: textcolor
}}>Good {timeOfDay}, {props.name}</Text>
</View>
</View>