import React, {FC, useEffect} from 'react' import { StyleSheet, View, StyleProp, ViewStyle } from 'react-native'; import { IconButton } from "react-native-paper"; import { useTheme } from "./ThemeContext"; interface ThemeTogglerProps { lightButtonIconName?: string, darkButtonIconName?: string, defaultButtonIconName?: string, selectedButtonColor?: string, defaultButtonColor?: string, buttonSize?: number, disableLightButton?: boolean, disableDarkButton?: boolean, disableDefaultButton?:boolean, lightButtonStyle?: StyleProp, darkButtonStyle?: StyleProp, defaultButtonStyle?: StyleProp, buttonsDirection?: 'row' | 'column' } const ThemeToggler:FC = (props) => { // Imports all useTheme functions const { updateThemeLight, updateThemeDark, updateThemeDefault, COLOR_SCHEME, useLocalColorScheme, useMixedTheme, } = useTheme() // Sets in state the localColorScheme const localColorScheme = useLocalColorScheme() // Stores the primary and text color to indicate what theme is in usage const { primary, text } = useMixedTheme().colors const activeButtonColor = props.selectedButtonColor ?? primary const inactiveButtonColor = props.defaultButtonColor ?? text useEffect(()=>()=>{null}, [useLocalColorScheme, props]) return ( ) } export default ThemeToggler const styles = StyleSheet.create({ flexRow: { flexDirection: 'row', justifyContent: 'space-around' }, flexColumn: { flexDirection: 'column', } })