fixed and broke the theme again

This commit is contained in:
Walcher 2023-12-08 16:52:24 +01:00
parent 424407faf3
commit f62b49b5cf
5 changed files with 23 additions and 24 deletions

View file

@ -9,6 +9,7 @@ import { useRouter } from "expo-router"
import { useAuth } from '../../contexts/AuthContext'; import { useAuth } from '../../contexts/AuthContext';
export default function Page() { export default function Page() {
const backgroundColor = useThemeColor("backgroundColor")
const router = useRouter() const router = useRouter()
const {onLogout} = useAuth(); const {onLogout} = useAuth();
const [plusShow, setPlusShow] = useState(true); const [plusShow, setPlusShow] = useState(true);
@ -53,7 +54,7 @@ export default function Page() {
return ( return (
<SafeAreaView style={{flex: 1}}> <SafeAreaView style={{flex: 1, backgroundColor: backgroundColor}}>
{plusShow && <Plus onPress={()=>{ {plusShow && <Plus onPress={()=>{
router.push("/(tabs)/home/addItem") router.push("/(tabs)/home/addItem")
}}/>} }}/>}

View file

@ -35,7 +35,6 @@ export default function login() {
placeholder={'Enter Password'} placeholder={'Enter Password'}
label='Password' label='Password'
leftIcon={<FontAwesome name="key" size={20} />} leftIcon={<FontAwesome name="key" size={20} />}
rightIcon={<FontAwesome name="key" size={20} />}
onChangeHandler={setPassword} onChangeHandler={setPassword}
secure = {true} secure = {true}
/> />

View file

@ -6,12 +6,11 @@ import { SIZES } from '../../../constants/theme';
type SearchBarProps = {placeholder: string} & ViewProps type SearchBarProps = {placeholder: string} & ViewProps
export default function SearchBar(props: SearchBarProps) { export default function SearchBar(props: SearchBarProps) {
const [isActive, setIsactive] = React.useState(false); const [isActive, setIsactive] = React.useState(false);
const backgroundColor = useThemeColor("backgroundColor"); const textColor = useThemeColor("interactiveText")
const backgroundColor = useThemeColor("containerColor");
const handleChange = (text:string) : void => { const handleChange = (text:string) : void => {
if(text !== ""){ if(text !== ""){
if(!isActive){ if(!isActive){
@ -46,7 +45,7 @@ const styles = StyleSheet.create({
justifyContent: "center", justifyContent: "center",
alignItems: "center", alignItems: "center",
height: 40, height: 40,
backgroundColor: "red", //tochange backgroundColor: backgroundColor,
borderRadius: 10, borderRadius: 10,
paddingHorizontal: 10 paddingHorizontal: 10
}, },

View file

@ -34,11 +34,13 @@ export default function Welcome(props: WelcomeProps) {
const onpress = props.onPress const onpress = props.onPress
const textcolor = useThemeColor("primaryText") const textcolor = useThemeColor("primaryText")
//const backgroundColor: string = useThemeColor("backgroundColor")
return ( return (
<View style={{ <View style={{
marginVertical: 20, marginVertical: 20,
marginHorizontal: MARGINS.normal, marginHorizontal: MARGINS.normal,
//backgroundColor: backgroundColor,
}}> }}>
<View style={{ <View style={{
flexDirection: "row", flexDirection: "row",

View file

@ -1,32 +1,30 @@
export default { export default {
light: { light: {
primaryText: "#000000", primaryText: "#000000",
secondaryText: "#404040", secondaryText: "#9E9E9E",
interactiveText: "#0645AD", interactiveText: "#388BFF",
tabIconDefault: "#FFFFFF",
tabIconSelected: "#EF6C00",
backgroundColor: "#FFFFFF",
tabIconDefault: "gray", containerColor: "#F5F5F5",
tabIconSelected: "#ED7D31", elementDefaultColor: "#E0E0E0",
color: "#000000", elementSelectedColor: "#9E9E9E",
accentColor: "#ED7D31", accentColor: "#EF6C00",
backgroundColor: "#ffffff",
tabBarColor: "gray",
}, },
dark: { dark: {
// Text
primaryText: "#FFFFFF", primaryText: "#FFFFFF",
secondaryText: "#B3B3B3", secondaryText: "#B3B3B3",
interactiveText: "#0645AD", interactiveText: "#388BFF",
// Tabs
tabIconDefault: "#FFFFFF", tabIconDefault: "#FFFFFF",
tabIconSelected: "#ED7D31", tabIconSelected: "#EF6C00",
// backgroundColor: "#121212",
color: "#FFFFFF", containerColor: "#181818",
accentColor: "#ED7D31", elementDefaultColor: "#535353",
backgroundColor: "#181818", elementSelectedColor: "#B3B3B3",
tabBarColor: "#121212", accentColor: "#EF6C00",
} }
} }