import React, { createElement } from 'react' import { AccessibilityProps, StyleProp, View, ViewStyle } from 'react-native' import * as FeatherIcon from 'react-native-feather' export interface Props { accessibilityLabel?: AccessibilityProps['accessibilityLabel'] name: string size: number color: string fill?: string strokeWidth?: number style?: StyleProp } const Icon: React.FC = ({ accessibilityLabel, name, size, color, fill, strokeWidth = 2, style }) => { return ( {createElement(FeatherIcon[name], { width: size, height: size, color, fill, strokeWidth })} ) } export default Icon