Skip to content

Commit

Permalink
fix: positioning
Browse files Browse the repository at this point in the history
  • Loading branch information
IsaccoSordo committed Sep 12, 2024
1 parent d5fa0d0 commit e2898e2
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions packages/beacon-ui/src/components/alert/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ import useIsMobile from 'src/ui/alert/hooks/useIsMobile'
const Alert: React.FC<React.PropsWithChildren<AlertProps>> = (props) => {
const isMobile = useIsMobile()

const backButton = props.onBackClick ? (
<Button variant="outlined" onClick={props.onBackClick}>
<LeftIcon />
</Button>
) : (
<Grid2 width={'3rem'} height={'1rem'} />
)

return (
<Modal open={true} onClose={props.onCloseClick}>
<Box
Expand All @@ -30,12 +38,7 @@ const Alert: React.FC<React.PropsWithChildren<AlertProps>> = (props) => {
justifyContent={'center'}
flexWrap={'nowrap'}
>
{props.onBackClick && (
<Button variant="outlined" onClick={props.onBackClick}>
<LeftIcon />
</Button>
)}
{!props.onBackClick && <Grid2 />}
{backButton}
<LogoIcon />
<Button variant="outlined" onClick={props.onCloseClick}>
<CloseIcon />
Expand Down

0 comments on commit e2898e2

Please sign in to comment.