mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-23 06:32:26 +01:00
Merge pull request #3620 from nickofolas/fix/modal-z-index
UI: Fix z-index of modals overriding everything
This commit is contained in:
commit
c799b2918b
@ -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}>
|
||||||
|
Loading…
Reference in New Issue
Block a user