fix: color does not work in dark mode
This commit is contained in:
parent
498c1d8563
commit
9c319eeeda
3 changed files with 8 additions and 1 deletions
|
|
@ -3,6 +3,7 @@ import {StyleSheet, View} from "react-native"
|
|||
|
||||
import { FontAwesome } from "@expo/vector-icons";
|
||||
import {useThemeColor} from "../hooks/hooks";
|
||||
import React from "react";
|
||||
|
||||
export default function Layout() {
|
||||
// const selectedColor: string = useThemeColor( "tabIconSelected");
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import { StyleSheet, View, Text, NativeSyntheticEvent, NativeScrollEvent, SafeAreaView } from 'react-native';
|
||||
import { StyleSheet, View, Text, NativeSyntheticEvent, NativeScrollEvent} from 'react-native';
|
||||
import { useThemeColor } from "../hooks/hooks";
|
||||
import { SafeAreaView } from 'react-native-safe-area-context'
|
||||
import { ExpenseItem, Plus, Welcome } from '../components';
|
||||
import { FlatList } from 'react-native-gesture-handler';
|
||||
import { useRef, useState } from 'react';
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Reference in a new issue