Added theme components. Reorganized them. Prepping for Tech Tracker Rewrite

This commit is contained in:
2025-03-04 16:55:45 -06:00
parent fb577e81db
commit 4775917db0
20 changed files with 595 additions and 72 deletions

View File

@@ -0,0 +1,34 @@
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;