managarten/apps-archived/nutriphi/apps/mobile/components/ui/SFSymbol.tsx
Till-JS 61d181fbc2 chore: archive inactive projects to apps-archived/
Move inactive projects out of active workspace:
- bauntown (community website)
- maerchenzauber (AI story generation)
- memoro (voice memo app)
- news (news aggregation)
- nutriphi (nutrition tracking)
- reader (reading app)
- uload (URL shortener)
- wisekeep (AI wisdom extraction)

Update CLAUDE.md documentation:
- Add presi to active projects
- Document archived projects section
- Update workspace configuration

Archived apps can be re-activated by moving back to apps/

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 07:03:59 +01:00

54 lines
1.4 KiB
TypeScript

import React from 'react';
import { Platform } from 'react-native';
import { SymbolView, SymbolViewProps } from 'expo-symbols';
import FontAwesome from '@expo/vector-icons/FontAwesome';
import { useColorScheme } from 'nativewind';
interface SFSymbolProps {
name: string;
size?: number;
color?: string;
weight?: SymbolViewProps['weight'];
scale?: SymbolViewProps['scale'];
mode?: SymbolViewProps['mode'];
fallbackIcon?: React.ComponentProps<typeof FontAwesome>['name'];
style?: SymbolViewProps['style'];
}
export const SFSymbol: React.FC<SFSymbolProps> = ({
name,
size = 24,
color,
weight = 'regular',
scale = 'default',
mode = 'monochrome',
fallbackIcon,
style,
}) => {
const { colorScheme } = useColorScheme();
// Use dynamic color if no color specified
const dynamicColor = color || (colorScheme === 'dark' ? '#ffffff' : '#374151');
// Use SF Symbols on iOS, fallback to FontAwesome on Android
if (Platform.OS === 'ios') {
return (
<SymbolView
name={name}
size={size}
tintColor={dynamicColor}
weight={weight}
scale={scale}
mode={mode}
style={style}
/>
);
}
// Android fallback
if (fallbackIcon) {
return <FontAwesome name={fallbackIcon} size={size} color={dynamicColor} style={style} />;
}
// Default fallback if no fallbackIcon provided
return <FontAwesome name="question-circle" size={size} color={dynamicColor} style={style} />;
};