Skip to content

Commit

Permalink
fix: defaultActionDisabled flag
Browse files Browse the repository at this point in the history
Signed-off-by: Tharun T <[email protected]>
  • Loading branch information
dottharun committed Jul 5, 2024
1 parent ca24a52 commit 35b0e9e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/custom/ActionButton/ActionButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@ interface Option {

interface ActionButtonProps {
defaultActionClick: () => void;
defaultActionDisabled?: boolean;
options: Option[];
label: string;
}

export default function ActionButton({
defaultActionClick,
defaultActionDisabled = false,
options,
label
}: ActionButtonProps): JSX.Element {
Expand Down Expand Up @@ -53,7 +55,7 @@ export default function ActionButton({
style={{ boxShadow: 'none' }}
aria-label="Button group with a nested menu"
>
<Button onClick={defaultActionClick} variant="contained">
<Button onClick={defaultActionClick} variant="contained" disabled={defaultActionDisabled}>
{label}
</Button>
<Button size="small" onClick={handleToggle} variant="contained">
Expand Down

0 comments on commit 35b0e9e

Please sign in to comment.