-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f7fd3fa
commit f6cc408
Showing
4 changed files
with
38 additions
and
23 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
apps/nextjs/.storybook/decorators/DialogContentDecorator.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import React from "react"; | ||
|
||
import type { Decorator } from "@storybook/react"; | ||
|
||
import type { DialogTypes } from "../../src/components/AppComponents/Chat/Chat/types"; | ||
import { DialogContext } from "../../src/components/AppComponents/DialogContext"; | ||
|
||
declare module "@storybook/csf" { | ||
interface Parameters { | ||
dialogWindow?: DialogTypes; | ||
} | ||
} | ||
|
||
export const DialogContentDecorator: Decorator = (Story, { parameters }) => { | ||
return ( | ||
<DialogContext.Provider | ||
value={{ | ||
dialogWindow: parameters.dialogWindow ?? "", | ||
setDialogWindow: () => {}, | ||
dialogProps: {}, | ||
setDialogProps: () => {}, | ||
openSidebar: false, | ||
setOpenSidebar: () => {}, | ||
}} | ||
> | ||
<Story /> | ||
</DialogContext.Provider> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters