Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue#1082 - The Exit Modals does not go on top of other #1105

Merged
merged 1 commit into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gui/src/components/TrackersStillOnModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export function TrackersStillOnModal({
const { l10n } = useLocalization();

return (
<BaseModal isOpen={isOpen} onRequestClose={cancel}>
<BaseModal isOpen={isOpen} onRequestClose={cancel} important>
<div className="flex flex-col gap-3">
<>
<div className="flex flex-col items-center gap-3 fill-accent-background-20">
Expand Down
2 changes: 1 addition & 1 deletion gui/src/components/TrayOrExitModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export function TrayOrExitModal({
});

return (
<BaseModal isOpen={isOpen} onRequestClose={cancel}>
<BaseModal isOpen={isOpen} onRequestClose={cancel} important>
<form
className="flex flex-col gap-3 w-[27rem]"
onSubmit={handleSubmit((form) => accept(form.exitType === '1'))}
Expand Down
5 changes: 4 additions & 1 deletion gui/src/components/commons/BaseModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ import ReactModal from 'react-modal';

export function BaseModal({
children,
important = false,
...props
}: {
isOpen: boolean;
children: ReactNode;
important?: boolean;
} & ReactModal.Props) {
return (
<ReactModal
Expand All @@ -18,7 +20,8 @@ export function BaseModal({
props.overlayClassName ||
classNames(
'fixed top-0 right-0 left-0 bottom-0 flex flex-col justify-center',
'items-center w-full h-full bg-background-90 bg-opacity-60 z-20'
'items-center w-full h-full bg-background-90 bg-opacity-60',
important ? 'z-50' : 'z-40'
)
}
className={
Expand Down