Skip to content

Commit

Permalink
feedback PR: clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
allangaldinosilva committed Dec 1, 2023
1 parent 38a5890 commit 61c2ba2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 21 deletions.
3 changes: 1 addition & 2 deletions src/components/BeamContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ import { SnackbarProvider } from "src/components/Snackbar/SnackbarContext";
import { SuperDrawer } from "src/components/SuperDrawer/SuperDrawer";
import { ContentStack } from "src/components/SuperDrawer/useSuperDrawer";
import { CanCloseCheck, CheckFn } from "src/types";
import { EmptyRef, isDefined } from "src/utils/index";
import { EmptyRef } from "src/utils/index";
import { RightPaneProvider } from "./Layout";
import { ToastProvider } from "./Toast/ToastContext";
import { ModalContext, ModalProvider } from "./Modal/ModalContext";

/** The internal state of our Beam context; see useModal and useSuperDrawer for the public APIs. */
export interface BeamContextState {
Expand Down
19 changes: 0 additions & 19 deletions src/components/Modal/Modal.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
TestModalFilterTable,
VirtualizedTable,
} from "src/components/Modal/TestModalContent";
import { Css } from "src/Css";
import { FormStateApp } from "src/forms/FormStateApp";
import { noop } from "src/utils/index";
import { withBeamDecorator, withDimensions } from "src/utils/sb";
Expand Down Expand Up @@ -112,24 +111,6 @@ export function ModalForm() {
);
}

export function InModalState() {
const { openModal, inModal } = useModal();
const open = () =>
openModal({
content: <TestModalContent />,
size: { width: "md", height: 600 },
});

return (
<div css={Css.df.fdc.$}>
<div css={Css.mb3.$}>
<Button label="Open" onClick={open} />
</div>
<span css={Css.lgMd.$}>In Modal: {inModal ? "YES" : "NO"}</span>
</div>
);
}

interface ModalExampleProps
extends Pick<ModalProps, "size" | "forceScrolling" | "drawHeaderBorder">,
TestModalContentProps {}
Expand Down

0 comments on commit 61c2ba2

Please sign in to comment.