const useStyles = makeStyles(theme => ({
    close: {
      padding: theme.spacing(0.5)
  }
  }));

  function SnackBarSimple({attributes, setOpen}) {
    const classes = useStyles(); 
    return (
      <div>
        <Snackbar
          anchorOrigin={{
            vertical: 'bottom',
            horizontal: 'left',
          }}
          open={attributes.open}
          autoHideDuration={6000}
          onClose={() => setOpen(false)}
          ContentProps={{
            'aria-describedby': 'message-id',
          }}
          message={<span id="message-id">{attributes.message}</span>}
          action={[
            <Button key="undo" color="secondary" size="small" onClick={() => setOpen(false)}>
              Error
            </Button>,
            <IconButton
              key="close"
              aria-label="close"
              color="inherit"
              className={classes.close}
              onClick={() => setOpen(false)}
            >
              <Icon>close</Icon>
            </IconButton>,
          ]}
        />
      </div>
    );
  
}