Skip to content

Commit 35b0e9e

Browse files
committed
fix: defaultActionDisabled flag
Signed-off-by: Tharun T <[email protected]>
1 parent ca24a52 commit 35b0e9e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/custom/ActionButton/ActionButton.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,14 @@ interface Option {
2020

2121
interface ActionButtonProps {
2222
defaultActionClick: () => void;
23+
defaultActionDisabled?: boolean;
2324
options: Option[];
2425
label: string;
2526
}
2627

2728
export default function ActionButton({
2829
defaultActionClick,
30+
defaultActionDisabled = false,
2931
options,
3032
label
3133
}: ActionButtonProps): JSX.Element {
@@ -53,7 +55,7 @@ export default function ActionButton({
5355
style={{ boxShadow: 'none' }}
5456
aria-label="Button group with a nested menu"
5557
>
56-
<Button onClick={defaultActionClick} variant="contained">
58+
<Button onClick={defaultActionClick} variant="contained" disabled={defaultActionDisabled}>
5759
{label}
5860
</Button>
5961
<Button size="small" onClick={handleToggle} variant="contained">

0 commit comments

Comments
 (0)