From 338e5db98497521357ec63a470a003515eb9d5ec Mon Sep 17 00:00:00 2001 From: James Parslow Date: Tue, 22 Oct 2024 16:17:04 +0100 Subject: [PATCH] docs(dialog-fullscreen): make WithBox story private --- .../dialog-full-screen-test.stories.tsx | 30 ++++++++++++++ .../dialog-full-screen/dialog-full-screen.mdx | 4 -- .../dialog-full-screen.stories.tsx | 41 ------------------- 3 files changed, 30 insertions(+), 45 deletions(-) diff --git a/src/components/dialog-full-screen/dialog-full-screen-test.stories.tsx b/src/components/dialog-full-screen/dialog-full-screen-test.stories.tsx index 4261a8405f..de44eddb64 100644 --- a/src/components/dialog-full-screen/dialog-full-screen-test.stories.tsx +++ b/src/components/dialog-full-screen/dialog-full-screen-test.stories.tsx @@ -216,3 +216,33 @@ WithTwoDifferentNodes.decorators = [ WithTwoDifferentNodes.parameters = { layout: "fullscreen", }; + +export const WithWrappedStickyForm: StoryType = { + args: { + children: ( + +
{}}>Cancel} + saveButton={ + + } + > + + + + + + + +
+ ), + open: true, + onCancel: () => {}, + title: "Title", + subtitle: "Subtitle", + }, + parameters: { chromatic: { disableSnapshot: true } }, +}; diff --git a/src/components/dialog-full-screen/dialog-full-screen.mdx b/src/components/dialog-full-screen/dialog-full-screen.mdx index 853a349c6c..502c03472f 100644 --- a/src/components/dialog-full-screen/dialog-full-screen.mdx +++ b/src/components/dialog-full-screen/dialog-full-screen.mdx @@ -57,10 +57,6 @@ to have a possibility to manage active `Tabs` group -### With `Box` - - - ### Overriding the first focused element By default, when a dialog is opened it will automatically focus the first element within its children that can be focussed. diff --git a/src/components/dialog-full-screen/dialog-full-screen.stories.tsx b/src/components/dialog-full-screen/dialog-full-screen.stories.tsx index 020e526556..add20392ea 100644 --- a/src/components/dialog-full-screen/dialog-full-screen.stories.tsx +++ b/src/components/dialog-full-screen/dialog-full-screen.stories.tsx @@ -718,47 +718,6 @@ WithHideableHeaderChildren.parameters = { chromatic: { disableSnapshot: true }, }; -export const WithBox: Story = () => { - const [isOpen, setIsOpen] = useState(false); - return ( - <> - - setIsOpen(false)} - title="Title" - subtitle="Subtitle" - > - -
setIsOpen(false)}>Cancel - } - saveButton={ - - } - > - - This is an example of a full screen Dialog with a Form as content - - - - - - - - -
-
- - ); -}; -WithBox.storyName = "With Box"; -WithBox.parameters = { chromatic: { disableSnapshot: true } }; - export const FocusingADifferentFirstElement: Story = () => { const [isOpenOne, setIsOpenOne] = useState(false); const [isOpenTwo, setIsOpenTwo] = useState(false);