Skip to content

Commit

Permalink
feat(ButtonAsync): Allow isSuccess to be optional
Browse files Browse the repository at this point in the history
  • Loading branch information
HHogg committed Aug 12, 2024
1 parent b36d825 commit 600ee41
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions workspaces/package/src/Button/ButtonAsync.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ export interface ButtonAsyncProps extends ButtonProps {
isError: boolean;
/** Whether the button is in a loading state */
isLoading: boolean;
/** Whether the button is in a success state */
isSuccess: boolean;
/** Whether the button is in a success state.
* If omitted it will just return to the default state
*/
isSuccess?: boolean;
}

export const ButtonAsync = forwardRef<any, ButtonAsyncProps>(
Expand All @@ -34,7 +36,7 @@ export const ButtonAsync = forwardRef<any, ButtonAsyncProps>(
error,
isError,
isLoading,
isSuccess,
isSuccess = false,
variant = 'secondary',
...rest
},
Expand Down

0 comments on commit 600ee41

Please sign in to comment.