mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-15 21:39:39 +02:00
- Move finance, mail, moodlit to apps-archived for later development - Rename games/voxel-lava to games/voxelava 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
58 lines
1.2 KiB
TypeScript
58 lines
1.2 KiB
TypeScript
import { SymbolView, SymbolViewProps, SymbolWeight } from 'expo-symbols';
|
|
import React from 'react';
|
|
|
|
type IconName =
|
|
| 'settings'
|
|
| 'settings-sliders'
|
|
| 'close'
|
|
| 'sun'
|
|
| 'star'
|
|
| 'star-fill'
|
|
| 'arrow-clockwise'
|
|
| 'chevron-left'
|
|
| 'phone-portrait'
|
|
| 'flashlight'
|
|
| 'play-circle'
|
|
| 'plus-circle'
|
|
| 'square-stack'
|
|
| 'list-bullet'
|
|
| 'pencil'
|
|
| 'trash';
|
|
|
|
interface IconProps {
|
|
name: IconName;
|
|
size?: number;
|
|
color?: string;
|
|
weight?: SymbolWeight;
|
|
}
|
|
|
|
const iconMap: Record<IconName, string> = {
|
|
settings: 'gearshape',
|
|
'settings-sliders': 'slider.horizontal.3',
|
|
close: 'xmark',
|
|
sun: 'sun.max.fill',
|
|
star: 'star',
|
|
'star-fill': 'star.fill',
|
|
'arrow-clockwise': 'arrow.clockwise',
|
|
'chevron-left': 'chevron.left',
|
|
'phone-portrait': 'iphone',
|
|
flashlight: 'flashlight.on.fill',
|
|
'play-circle': 'play.circle',
|
|
'plus-circle': 'plus.circle.fill',
|
|
'square-stack': 'square.stack.fill',
|
|
'list-bullet': 'list.bullet',
|
|
pencil: 'pencil',
|
|
trash: 'trash',
|
|
};
|
|
|
|
export const Icon = ({ name, size = 24, color = '#FFFFFF', weight = 'regular' }: IconProps) => {
|
|
return (
|
|
<SymbolView
|
|
name={iconMap[name]}
|
|
size={size}
|
|
type="hierarchical"
|
|
tintColor={color}
|
|
weight={weight}
|
|
/>
|
|
);
|
|
};
|