mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-05-05 15:17:48 +02:00
UI: Scroll to top when opening new NS API doc page in popup mode (#2181)
This commit is contained in:
@@ -43,6 +43,7 @@ interface ModalProps {
|
||||
onClose: () => void;
|
||||
children: React.ReactNode;
|
||||
sx?: SxProps<Theme>;
|
||||
wrapperRef?: React.RefObject<HTMLDivElement>;
|
||||
wrapperStyles?: CSSProperties;
|
||||
removeFocus?: boolean;
|
||||
// If it's true, the player can dismiss the modal by pressing the Esc button or clicking on the backdrop.
|
||||
@@ -54,6 +55,7 @@ export const Modal = ({
|
||||
onClose,
|
||||
children,
|
||||
sx,
|
||||
wrapperRef,
|
||||
wrapperStyles,
|
||||
removeFocus = true,
|
||||
canBeDismissedEasily = true,
|
||||
@@ -84,6 +86,7 @@ export const Modal = ({
|
||||
>
|
||||
<Fade in={open}>
|
||||
<div
|
||||
ref={wrapperRef}
|
||||
className={classes.paper}
|
||||
style={wrapperStyles}
|
||||
//@ts-expect-error inert is not supported by react types yet, this is a workaround until then. https://github.com/facebook/react/pull/24730
|
||||
|
||||
Reference in New Issue
Block a user