2023-09-11 21:12:37 +08:00
|
|
|
import React, { memo } from 'react';
|
|
|
|
import cx from 'classnames';
|
|
|
|
import Styled from './styles';
|
|
|
|
|
|
|
|
interface IconProps {
|
|
|
|
iconName: string;
|
|
|
|
prependIconName?: string;
|
|
|
|
rotate?: boolean;
|
|
|
|
className?: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
const Icon: React.FC<IconProps> = ({
|
2024-06-11 21:05:08 +08:00
|
|
|
className = '',
|
|
|
|
prependIconName = 'icon-bbb-',
|
|
|
|
iconName = '',
|
2023-09-11 21:12:37 +08:00
|
|
|
rotate = false,
|
|
|
|
}) => (
|
|
|
|
<Styled.Icon
|
|
|
|
className={cx(className, [prependIconName, iconName].join(''))}
|
|
|
|
$rotate={rotate}
|
|
|
|
/>
|
|
|
|
);
|
|
|
|
|
|
|
|
export default memo(Icon);
|