Skip to content

Commit

Permalink
fix(alert): 🐛 fix primary and secondary buttons ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
lipe-dev committed Feb 15, 2023
1 parent 9b1f192 commit ef89c5a
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions lib/components/Alert/Alert.tsx
Expand Up @@ -107,26 +107,26 @@ export default function Alert(props: PropsWithChildren<AlertProps>) {

{(!!onPrimaryButtonClicked || !!onSecondaryButtonClicked) && (
<Box direction="row" colGap="sm">
{!!onPrimaryButtonClicked && (
{!!onSecondaryButtonClicked && (
<Button
variant={secondaryButtonVariant}
buttonStyle={secondaryButtonStyle}
endIcon={primaryButtonIconEnd}
startIcon={primaryButtonIconStart}
onClick={onPrimaryButtonClicked}
endIcon={secondaryButtonIconEnd}
startIcon={secondaryButtonIconStart}
onClick={onSecondaryButtonClicked}
>
{primaryButtonContents}
{secondaryButtonContents}
</Button>
)}
{!!onSecondaryButtonClicked && (
{!!onPrimaryButtonClicked && (
<Button
variant={primaryButtonVariant}
buttonStyle={primaryButtonStyle}
endIcon={secondaryButtonIconEnd}
startIcon={secondaryButtonIconStart}
onClick={onSecondaryButtonClicked}
endIcon={primaryButtonIconEnd}
startIcon={primaryButtonIconStart}
onClick={onPrimaryButtonClicked}
>
{secondaryButtonContents}
{primaryButtonContents}
</Button>
)}
</Box>
Expand Down

0 comments on commit ef89c5a

Please sign in to comment.