Skip to content

Commit

Permalink
fix: make close button visible on small devices (#2880)
Browse files Browse the repository at this point in the history
  • Loading branch information
kwasniew committed Jan 11, 2023
1 parent 0d238cd commit 3e4e0e4
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions frontend/src/component/common/SidebarModal/SidebarModal.tsx
Expand Up @@ -29,6 +29,13 @@ const FixedWidthContentWrapper = styled(ModalContentWrapper)({
width: 1300,
});

const StyledIconButton = styled(IconButton)(({ theme }) => ({
zIndex: 1,
position: 'absolute',
top: theme.spacing(3),
right: theme.spacing(3),
}));

export const BaseModal: FC<ISidebarModalProps> = ({
open,
onClose,
Expand Down Expand Up @@ -67,16 +74,9 @@ export const DynamicSidebarModal: FC<ISidebarModalProps> = props => {
<BaseModal {...props}>
<ModalContentWrapper>
<Tooltip title="Close" arrow describeChild>
<IconButton
sx={theme => ({
position: 'absolute',
top: theme.spacing(3),
right: theme.spacing(3),
})}
onClick={props.onClose}
>
<StyledIconButton onClick={props.onClose}>
<CloseIcon />
</IconButton>
</StyledIconButton>
</Tooltip>
{props.children}
</ModalContentWrapper>
Expand Down

0 comments on commit 3e4e0e4

Please sign in to comment.