1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-25 00:07:47 +01:00

fix: make close button visible on small devices (#2880)

This commit is contained in:
Mateusz Kwasniewski 2023-01-11 15:10:43 +01:00 committed by GitHub
parent 0d238cdef6
commit 3e4e0e4df9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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,
@ -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>