useTheme applied globally
This commit is contained in:
parent
1f304d41f2
commit
9de2678922
12 changed files with 31 additions and 39 deletions
|
|
@ -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 !== ""){
|
||||
|
|
|
|||
Reference in a new issue