import React, { memo } from 'react'; import Styled from './styles'; interface IconProps { iconName: string; rotate?: boolean; wrapped?: boolean; } const iconsMap: { [key: string]: JSX.Element } = { reactions: ( ), recording: ( ), whiteboardOptions: ( ), }; const Icon: React.FC = ({ iconName = '', rotate = false, wrapped = false, }) => { if (!iconsMap[iconName]) { return null; } if (!wrapped) { return iconsMap[iconName]; } return ( {iconsMap[iconName]} ); }; export default memo(Icon);