Skip to content

Commit

Permalink
Fixed close button placement
Browse files Browse the repository at this point in the history
  • Loading branch information
mikael-jarvinen committed Apr 19, 2022
1 parent 7222123 commit 3ac7b0f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/Dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,15 @@ const Dialog = ({
}: DialogProps): JSX.Element => {
return (
<MuiDialog fullScreen={fullScreen} open={open} onClose={onClose} {...props}>
<MuiDialogTitle>
<MuiDialogTitle sx={{ pr: 8 }}>
{dialogTitle}
<Button
onClick={onClose as MouseEventHandler<HTMLButtonElement>}
sx={{
padding: '12px',
borderRadius: '50%',
position: 'absolute',
top: 10,
right: 8,
}}
>
<Close fontSize="small" />
Expand Down
1 change: 1 addition & 0 deletions stories/Feedback/Dialog.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ export default {
</>
),
dialogTitle: 'This is the dialog title',
fullWidth: true,
},
} as Meta;

Expand Down

0 comments on commit 3ac7b0f

Please sign in to comment.