mirror of
https://github.com/Kingsrook/qqq-frontend-material-dashboard.git
synced 2025-07-17 21:00:45 +00:00
CE-793 - Add disabled prop to delete button
This commit is contained in:
@ -73,13 +73,17 @@ export function QSaveButton({label, iconName, onClickHandler, disabled}: QSaveBu
|
|||||||
interface QDeleteButtonProps
|
interface QDeleteButtonProps
|
||||||
{
|
{
|
||||||
onClickHandler: any
|
onClickHandler: any
|
||||||
|
disabled?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export function QDeleteButton({onClickHandler}: QDeleteButtonProps): JSX.Element
|
QDeleteButton.defaultProps = {
|
||||||
|
disabled: false
|
||||||
|
};
|
||||||
|
export function QDeleteButton({onClickHandler, disabled}: QDeleteButtonProps): JSX.Element
|
||||||
{
|
{
|
||||||
return (
|
return (
|
||||||
<Box ml={3} width={standardWidth}>
|
<Box ml={3} width={standardWidth}>
|
||||||
<MDButton variant="gradient" color="primary" size="small" onClick={onClickHandler} fullWidth startIcon={<Icon>delete</Icon>}>
|
<MDButton variant="gradient" color="primary" size="small" onClick={onClickHandler} fullWidth startIcon={<Icon>delete</Icon>} disabled={disabled}>
|
||||||
Delete
|
Delete
|
||||||
</MDButton>
|
</MDButton>
|
||||||
</Box>
|
</Box>
|
||||||
|
Reference in New Issue
Block a user