/*
 * @Author: zhoux zhouxia@supervision.ltd
 * @Date: 2023-11-15 15:01:34
 * @LastEditors: zhoux zhouxia@supervision.ltd
 * @LastEditTime: 2023-12-20 11:25:15
 * @FilePath: \general-ai-platform-web\src\components\DictionaryBox\isEnable.tsx
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { ArrowUpOutlined, DownOutlined } from '@ant-design/icons';

type AlarmLevelBoxProps = {
  icon?: 'ArrowUpOutlined' | 'default' | undefined;
  color?: string;
  size?: number;
};

const AlarmLevelBox: React.FC<AlarmLevelBoxProps> = (props) => {
  const { icon, color, size } = props;
  const finalSize = size || 14;
  return (
    <div
      style={{
        backgroundColor: color,
        display: 'flex',
        justifyContent: 'center',
        alignItems: 'center',
        width: finalSize,
        height: finalSize,
        borderRadius: '50%',
        color: 'white',
        fontSize: finalSize * 0.55,
      }}
    >
      {icon === 'ArrowUpOutlined' ? <ArrowUpOutlined /> : <DownOutlined />}
    </div>
  );
};

export default AlarmLevelBox;
