skyouc
2025-02-24 ec99136e6a43f0a251b476cf1d4782cf3691ea8c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import { IconButton } from '@mui/material';
import CloseIcon from '@mui/icons-material/Close';
 
const DialogCloseButton = (props) => {
    const {
        onClose,
        top = 8,
        right = 8,
        color,
    } = props;
 
    return (
        <>
            <IconButton
                aria-label="close"
                onClick={onClose}
                sx={{
                    position: 'absolute',
                    right,
                    top,
                    color: theme => (color ? color : theme.palette.grey[500]),
                }}
            >
                <CloseIcon />
            </IconButton>
        </>
    );
};
 
export default DialogCloseButton;