1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-04 00:18:01 +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, width: 1300,
}); });
const StyledIconButton = styled(IconButton)(({ theme }) => ({
zIndex: 1,
position: 'absolute',
top: theme.spacing(3),
right: theme.spacing(3),
}));
export const BaseModal: FC<ISidebarModalProps> = ({ export const BaseModal: FC<ISidebarModalProps> = ({
open, open,
onClose, onClose,
@ -67,16 +74,9 @@ export const DynamicSidebarModal: FC<ISidebarModalProps> = props => {
<BaseModal {...props}> <BaseModal {...props}>
<ModalContentWrapper> <ModalContentWrapper>
<Tooltip title="Close" arrow describeChild> <Tooltip title="Close" arrow describeChild>
<IconButton <StyledIconButton onClick={props.onClose}>
sx={theme => ({
position: 'absolute',
top: theme.spacing(3),
right: theme.spacing(3),
})}
onClick={props.onClose}
>
<CloseIcon /> <CloseIcon />
</IconButton> </StyledIconButton>
</Tooltip> </Tooltip>
{props.children} {props.children}
</ModalContentWrapper> </ModalContentWrapper>