Files
Schnappix/src/components/Icon.tsx
T

27 lines
628 B
TypeScript

import React from 'react';
import { FontAwesomeIcon } from '@fortawesome/react-native-fontawesome';
import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
import { THEME } from '../styles/theme';
interface IconProps {
icon: IconDefinition;
size?: number;
color?: string;
style?: any;
}
/**
* Schnappix Icon wrapper around FontAwesome.
* Defaults to the neon accent cyan color.
*/
export default function Icon({ icon, size = 24, color, style }: IconProps) {
return (
<FontAwesomeIcon
icon={icon}
size={size}
color={color || THEME.colors.accent}
style={style}
/>
);
}