import React from 'react'; export interface SvgIconProps extends React.SVGProps { /** Color code of icon */ color?: string; /** Size of icon, in `px` */ size?: number; /** Vertical align of icon, default is `middle` */ verticalAlign?: string; /** Additional style apply to icon */ style?: Record; /** viewBox of svg */ viewBox?: string; /** Icon name */ title?: string; } const SVGIcon = ({ /** Color code of icon */ color = 'currentColor', /** Size of icon, in `px` */ size = 20, /** Additional style apply to icon */ style = {}, /** Vertical align of icon, default is `middle` */ verticalAlign = 'middle', /** viewBox of svg */ viewBox = '0 0 217 217', title = '', children, ...remainProps }: SvgIconProps) => { const rootStyle = { verticalAlign, fill: color, width: `${size}px`, height: `${size}px`, ...style, }; return ( // focusable IE specific feature {title} {children} ); }; export default SVGIcon;