This commit is contained in:
Morten Olsen
2022-05-10 19:04:05 +02:00
parent 0b2f23ecb2
commit 8259232a83
101 changed files with 1752 additions and 1740 deletions

View File

@@ -0,0 +1,29 @@
import React from 'react';
import { Feather, } from '@expo/vector-icons';
import { useTheme } from 'styled-components/native';
import { Theme } from '#/ui/theme';
type IconNames = keyof typeof Feather.glyphMap;
type Props = {
size?: number;
color?: keyof Theme['colors'];
name: IconNames;
}
function Icon({
size,
color,
name,
}: Props) {
const theme = useTheme();
return (
<Feather
name={name}
color={color ? theme.colors[color] : theme.colors.icon}
size={size ?? theme.sizes.icons}
/>
)
};
export type { IconNames };
export { Icon };