#
Junjie
2024-10-15 f43b508dda7334487a1640b0bbd908d7b3aa3cb6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import React from 'react';
import { CheckOutlined, StopOutlined, MinusOutlined } from '@ant-design/icons';
 
const BoolValueIcon = ({ value }) => {
    let icon;
    if (value === undefined || value === null) {
        icon = <MinusOutlined style={{ color: '#34495e', fontSize: '1.2em', fontWeight: 'bold' }} />;
    } else if (value) {
        icon = <CheckOutlined style={{ color: '#2980b9', fontSize: '1.2em', fontWeight: 'bold' }} />;
    } else {
        icon = <StopOutlined style={{ color: '#c0392b', fontSize: '1.2em', fontWeight: 'bold' }} />;
    }
 
    return (
        <div style={{ display: 'flex', justifyContent: 'center' }}>
            {icon}
        </div>
    );
};
 
export default BoolValueIcon;