import { url } from "../../App";

import { Box } from "@mui/system"
import HighlightOffRoundedIcon from '@mui/icons-material/HighlightOffRounded';


export function UploadedFiles({ image, onDelete }) {
    return (
        <Box className='imgBlock' sx={{
            position: 'relative'
        }}>
            <img
                style={{ maxWidth: '200px', margin: '5px' }}
                src={url + image.url} key={image._id}
            />
            <HighlightOffRoundedIcon style={{
                position: 'absolute',
                top: '7px',
                right: '7px',
                color: 'rgba(238, 238, 238, 0.8)',
                fontSize: '25px',
                cursor: 'default'
            }}
                onClick={() => onDelete(image)} />
        </Box>
    )
} 