mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-22 14:47:56 +01:00
Remove delete icon when no note is present.
This commit is contained in:
parent
58d8ab0708
commit
c9c2194a57
@ -13,20 +13,22 @@ const SaveAndDelete = (props: {
|
|||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
<Box component="span">
|
<Box component="span">
|
||||||
<IconButton
|
|
||||||
onClick={() => {
|
|
||||||
props.closeModal();
|
|
||||||
props.model.setValue(undefined);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<DeleteOutlineOutlinedIcon />
|
|
||||||
</IconButton>
|
|
||||||
<Button color="primary" variant="outlined" onClick={props.submitHandler} sx={{ mr: 1 }}>
|
<Button color="primary" variant="outlined" onClick={props.submitHandler} sx={{ mr: 1 }}>
|
||||||
{$msg('ACCEPT')}
|
{$msg('ACCEPT')}
|
||||||
</Button>
|
</Button>
|
||||||
<Button color="primary" variant="contained" onClick={props.closeModal}>
|
<Button color="primary" variant="contained" onClick={props.closeModal}>
|
||||||
{$msg('CANCEL')}
|
{$msg('CANCEL')}
|
||||||
</Button>
|
</Button>
|
||||||
|
{props.model.getValue() && props.model.getValue().trim() !== '' && (
|
||||||
|
<IconButton
|
||||||
|
onClick={() => {
|
||||||
|
props.closeModal();
|
||||||
|
props.model.setValue(undefined);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<DeleteOutlineOutlinedIcon />
|
||||||
|
</IconButton>
|
||||||
|
)}
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user