Skip to content

Commit

Permalink
fix(ButtonAsync): Add support for all variants
Browse files Browse the repository at this point in the history
  • Loading branch information
HHogg committed Aug 12, 2024
1 parent 20cb99a commit 93ef392
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions workspaces/package/src/Button/ButtonAsync.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,9 @@ export const ButtonAsync = forwardRef<any, ButtonAsyncProps>(
return (
<Button
{...rest}
variant={
isLoading || showHappyFace || showSadFace ? 'secondary' : variant
}
variant={isError && variant === 'tertiary' ? 'secondary' : variant}
color={
(showSadFace && 'negative') ||
(showHappyFace && 'positive') ||
rest.color
(isError && 'negative') || (showHappyFace && 'positive') || rest.color
}
container
ref={ref}
Expand Down

0 comments on commit 93ef392

Please sign in to comment.