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 { FontAwesome } from "@expo/vector-icons";
|
||||||
import {useThemeColor} from "../hooks/hooks";
|
import {useThemeColor} from "../hooks/hooks";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
export default function Layout() {
|
export default function Layout() {
|
||||||
// const selectedColor: string = useThemeColor( "tabIconSelected");
|
// 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 { useThemeColor } from "../hooks/hooks";
|
||||||
|
import { SafeAreaView } from 'react-native-safe-area-context'
|
||||||
import { ExpenseItem, Plus, Welcome } from '../components';
|
import { ExpenseItem, Plus, Welcome } from '../components';
|
||||||
import { FlatList } from 'react-native-gesture-handler';
|
import { FlatList } from 'react-native-gesture-handler';
|
||||||
import { useRef, useState } from 'react';
|
import { useRef, useState } from 'react';
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ import { View, Text, ViewProps, Image, GestureResponderEvent } from 'react-nativ
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import { MARGINS, SIZES, SHADOWS } from '../../../constants/theme'
|
import { MARGINS, SIZES, SHADOWS } from '../../../constants/theme'
|
||||||
import { TouchableOpacity } from 'react-native-gesture-handler'
|
import { TouchableOpacity } from 'react-native-gesture-handler'
|
||||||
|
import { useThemeColor } from '../../../hooks/hooks'
|
||||||
|
|
||||||
type WelcomeProps = ViewProps & {name: string, image : any, onPress: () => void | undefined}
|
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 timeOfDay = getTimeOfDay(date)
|
||||||
const onpress = props.onPress
|
const onpress = props.onPress
|
||||||
|
|
||||||
|
const textcolor = useThemeColor("primaryText")
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={{
|
<View style={{
|
||||||
marginVertical: 20,
|
marginVertical: 20,
|
||||||
|
|
@ -52,6 +55,7 @@ export default function Welcome(props: WelcomeProps) {
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
<Text style={{
|
<Text style={{
|
||||||
fontSize: SIZES.xlarge,
|
fontSize: SIZES.xlarge,
|
||||||
|
color: textcolor
|
||||||
}}>{dateString}</Text>
|
}}>{dateString}</Text>
|
||||||
</View>
|
</View>
|
||||||
<View style={{
|
<View style={{
|
||||||
|
|
@ -59,6 +63,7 @@ export default function Welcome(props: WelcomeProps) {
|
||||||
}}>
|
}}>
|
||||||
<Text style={{
|
<Text style={{
|
||||||
fontSize: SIZES.xlarge,
|
fontSize: SIZES.xlarge,
|
||||||
|
color: textcolor
|
||||||
}}>Good {timeOfDay}, {props.name}</Text>
|
}}>Good {timeOfDay}, {props.name}</Text>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
|
|
||||||
Reference in a new issue