Fix modal z-index

This commit is contained in:
nickofolas 2022-05-06 11:35:23 -05:00
parent b46718d188
commit 3e9bcea9e4
2 changed files with 9 additions and 7 deletions

@ -35,7 +35,7 @@ export function NSSelection(props: IProps): React.ReactElement {
} }
return ( return (
<Modal open={props.open} onClose={props.onClose}> <Modal open={props.open} onClose={props.onClose} sx={{ zIndex: 999999 }}>
<Tabs variant="fullWidth" value={value} onChange={handleChange}> <Tabs variant="fullWidth" value={value} onChange={handleChange}>
<Tab label="NS1" /> <Tab label="NS1" />
<Tab label="NS2" /> <Tab label="NS2" />

@ -1,10 +1,11 @@
import React from "react";
import { Theme } from "@mui/material"; import { Theme } from "@mui/material";
import makeStyles from "@mui/styles/makeStyles";
import createStyles from "@mui/styles/createStyles";
import M from "@mui/material/Modal";
import Fade from "@mui/material/Fade";
import Box from "@mui/material/Box"; import Box from "@mui/material/Box";
import Fade from "@mui/material/Fade";
import M from "@mui/material/Modal";
import createStyles from "@mui/styles/createStyles";
import makeStyles from "@mui/styles/makeStyles";
import { SxProps } from "@mui/system";
import React from "react";
const useStyles = makeStyles((theme: Theme) => const useStyles = makeStyles((theme: Theme) =>
createStyles({ createStyles({
@ -12,7 +13,6 @@ const useStyles = makeStyles((theme: Theme) =>
display: "flex", display: "flex",
alignItems: "center", alignItems: "center",
justifyContent: "center", justifyContent: "center",
zIndex: 999999,
}, },
paper: { paper: {
backgroundColor: theme.palette.background.default, backgroundColor: theme.palette.background.default,
@ -35,6 +35,7 @@ interface IProps {
open: boolean; open: boolean;
onClose: () => void; onClose: () => void;
children: React.ReactNode; children: React.ReactNode;
sx?: SxProps<Theme>;
} }
export const Modal = (props: IProps): React.ReactElement => { export const Modal = (props: IProps): React.ReactElement => {
@ -49,6 +50,7 @@ export const Modal = (props: IProps): React.ReactElement => {
onClose={props.onClose} onClose={props.onClose}
closeAfterTransition closeAfterTransition
className={classes.modal} className={classes.modal}
sx={props.sx}
> >
<Fade in={props.open}> <Fade in={props.open}>
<div className={classes.paper}> <div className={classes.paper}>