enum IconSet { Menu, Twitter, } type iconprops = { icon: IconSet; width?: number; height?: number; } & React.SVGProps; const Icon = ({ icon, width, height, ...props }: iconprops) => { switch (icon) { // guide for adding these: // - add {width || ogWidth} // - add {height || ogHeight} // - add {...props} case IconSet.Menu: return ( ); break; case IconSet.Twitter: return ( ); break; } }; export { Icon, IconSet };