From 1ba1b005b4125bb15664b6039f319ca125f14dc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Bruus=20Zeppelin?= Date: Tue, 29 Oct 2024 09:49:41 +0100 Subject: [PATCH] Remove autodocs from modal stories --- .../shared/FullscreenNotice/FullscreenNotice.stories.tsx | 1 + .../popupX/shared/FullscreenNotice/FullscreenNotice.tsx | 8 ++------ .../src/popup/shared/Modal/Modal.stories.tsx | 1 + 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/browser-wallet/src/popup/popupX/shared/FullscreenNotice/FullscreenNotice.stories.tsx b/packages/browser-wallet/src/popup/popupX/shared/FullscreenNotice/FullscreenNotice.stories.tsx index 80afd4c4d..d50c9386d 100644 --- a/packages/browser-wallet/src/popup/popupX/shared/FullscreenNotice/FullscreenNotice.stories.tsx +++ b/packages/browser-wallet/src/popup/popupX/shared/FullscreenNotice/FullscreenNotice.stories.tsx @@ -16,6 +16,7 @@ export default { body?.classList.remove('popup-x'); }; }, + tags: ['!autodocs'], } as Meta; type Story = StoryObj; diff --git a/packages/browser-wallet/src/popup/popupX/shared/FullscreenNotice/FullscreenNotice.tsx b/packages/browser-wallet/src/popup/popupX/shared/FullscreenNotice/FullscreenNotice.tsx index 0075e53ac..e5e9fca5f 100644 --- a/packages/browser-wallet/src/popup/popupX/shared/FullscreenNotice/FullscreenNotice.tsx +++ b/packages/browser-wallet/src/popup/popupX/shared/FullscreenNotice/FullscreenNotice.tsx @@ -27,7 +27,7 @@ function Header({ isScrolling, onBack }: HeaderProps) { const htmlElement = document.getElementsByTagName('html')[0]!; const bodyElement = document.getElementsByTagName('body')[0]!; -export type ModalProps = { +type Props = { /** Control whether notice is shown or not */ open: boolean; /** Invoked when the notice is closed */ @@ -50,11 +50,7 @@ export type ModalProps = { * This content is shown in a modal! * */ -export default function FullscreenNotice({ - open, - onClose, - children, -}: PropsWithChildren): JSX.Element | null { +export default function FullscreenNotice({ open, onClose, children }: PropsWithChildren): JSX.Element | null { const [scroll, setScroll] = React.useState(0); const isScrolling = useMemo(() => scroll > 0, [!!scroll]); const close = useCallback(() => { diff --git a/packages/browser-wallet/src/popup/shared/Modal/Modal.stories.tsx b/packages/browser-wallet/src/popup/shared/Modal/Modal.stories.tsx index 6cc9a2005..b5a976195 100644 --- a/packages/browser-wallet/src/popup/shared/Modal/Modal.stories.tsx +++ b/packages/browser-wallet/src/popup/shared/Modal/Modal.stories.tsx @@ -6,6 +6,7 @@ import Modal from './Modal'; export default { title: 'Shared/Modal', component: Modal, + tags: ['!autodocs'], } as Meta; type Story = StoryObj;