Update dark mode
This commit is contained in:
parent
84aab76737
commit
4b2d3b8b32
6 changed files with 45 additions and 28 deletions
13
lib/components/ThemedIcon.tsx
Normal file
13
lib/components/ThemedIcon.tsx
Normal file
|
@ -0,0 +1,13 @@
|
|||
// You can (explore) the built-in icon families and icons on the web at https://icons.expo.fyi/
|
||||
|
||||
import Ionicons from '@expo/vector-icons/Ionicons';
|
||||
import { type IconProps } from '@expo/vector-icons/build/createIconSet';
|
||||
import { type ComponentProps } from 'react';
|
||||
import { useColorScheme } from '@/lib/hooks/useColorScheme';
|
||||
import { Colors } from '@/lib/constants/Colors';
|
||||
|
||||
export function ThemedIcon({ style, ...rest }: IconProps<ComponentProps<typeof Ionicons>['name']>) {
|
||||
const colorScheme = useColorScheme() ?? 'light';
|
||||
|
||||
return <Ionicons color={Colors[ colorScheme ].text} style={[ style ]} {...rest} />;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue