verou
2025-03-21 242bcd15240d652874a9b19823d2ef3ed1f90347
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;