bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/common/icon/icon-ts/component.tsx
2023-09-11 10:22:45 -03:00

33 lines
588 B
TypeScript

import React, { memo } from 'react';
import cx from 'classnames';
import Styled from './styles';
interface IconProps {
iconName: string;
prependIconName?: string;
rotate?: boolean;
className?: string;
}
const defaultProps = {
prependIconName: 'icon-bbb-',
rotate: false,
className: '',
};
const Icon: React.FC<IconProps> = ({
className,
prependIconName,
iconName,
rotate = false,
}) => (
<Styled.Icon
className={cx(className, [prependIconName, iconName].join(''))}
$rotate={rotate}
/>
);
Icon.defaultProps = defaultProps;
export default memo(Icon);