Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion packages/@react-spectrum/s2/stories/Dialog.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,25 @@ function DialogContainerExampleRender(props: ExampleDialogProps): ReactElement {

export const DialogContainerExample: StoryObj<typeof DialogContainerExampleRender> = {
render: (args) => <DialogContainerExampleRender {...args} />,
args: DialogTriggerExample.args
args: DialogTriggerExample.args,
parameters: {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one question, we previously documented DialogContainer as its own page. This will work with any of our Dialogs, should we have it on its own page as well?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh we actually have it in https://react-spectrum.adobe.com/beta/s2/Dialog.html#dialog-container, which I think should suffice going forward.

docs: {
source: {
transform: () => {
return `
let [isOpen, setOpen] = useState(false);

<Button variant="accent" onPress={() => setOpen(true)}>Open dialog</Button>
<DialogContainer onDismiss={() => setOpen(false)} {...props}>
{isOpen &&
<ExampleDialog {...props} />
}
</DialogContainer>
`;
}
}
}
}
};

export const ColorScheme: StoryObj<typeof ExampleDialog> = {
Expand Down