Add Sign in with Apple sorta
This commit is contained in:
20
components/theme/ui/ThemedIcon.tsx
Normal file
20
components/theme/ui/ThemedIcon.tsx
Normal file
@@ -0,0 +1,20 @@
|
||||
import React from 'react';
|
||||
import { StyleSheet, ViewProps } from 'react-native';
|
||||
import { Ionicons } from '@expo/vector-icons'; // Or your preferred icon library
|
||||
import { Colors } from '@/constants/Colors';
|
||||
import { useColorScheme } from '@/hooks/useColorScheme';
|
||||
|
||||
type ThemedIconProps = ViewProps & {
|
||||
name: string;
|
||||
size?: number;
|
||||
color?: string;
|
||||
};
|
||||
|
||||
const ThemedIcon: React.FC<ThemedIconProps> = ({ name, size = 24, color, style, ...restProps }) => {
|
||||
const scheme = useColorScheme() ?? 'dark';
|
||||
const iconColor = color || Colors[scheme].text;
|
||||
|
||||
return <Ionicons name={name} size={size} color={iconColor} style={style} {...restProps} />;
|
||||
};
|
||||
|
||||
export default ThemedIcon;
|
||||
Reference in New Issue
Block a user