useTheme applied globally

This commit is contained in:
Jakob Stornig 2023-12-30 14:35:05 +01:00
parent 1f304d41f2
commit 9de2678922
12 changed files with 31 additions and 39 deletions

View file

@ -2,15 +2,16 @@ import { AntDesign } from '@expo/vector-icons';
import React from 'react';
import { StyleSheet, TextInput, TouchableOpacity, View, ViewProps } from 'react-native';
import { SIZES } from '../../constants/theme';
import { useThemeColor } from '../../hooks/useThemeColor';
import { useTheme } from '../../app/contexts/ThemeContext';
type SearchBarProps = {placeholder: string} & ViewProps
export default function SearchBar(props: SearchBarProps) {
const [isActive, setIsactive] = React.useState(false);
const { colors } = useTheme();
const textColor = useThemeColor("interactiveText")
const backgroundColor = useThemeColor("elementDefaultColor");
const textColor = colors
const backgroundColor = colors.elementDefaultColor;
const handleChange = (text:string) : void => {
if(text !== ""){