Skip to content

Commit 26ebf42

Browse files
committed
Update modal story
1 parent 414105b commit 26ebf42

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

stories/Modal.stories.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ function Home(){
4141
<modal.Component title="foo modal title">
4242
<h1>Foo modal content</h1>
4343
</modal.Component>
44-
<Button nativeButtonProps={modal.buttonProps}>Open foo modal</Button> {/* Use this if you are in Next App Dir and you don't want to label the "use client"; the component hosting the Modal. */}
45-
<Button onClick={()=> modal.open()}>Open foo modal</Button> {/* ...otherwise modal.open() works just as well and is more versatile */}
46-
<Button onClick={()=> modal.close()}>Close foo modal</Button>
44+
<Button nativeButtonProps={modal.buttonProps}>Open modal (stateless approach)</Button> {/* Use this if you are in Next App Dir and you don't want to label the "use client"; the component hosting the Modal. */}
45+
<Button onClick={()=> modal.open()}>Open modal with modal.open()</Button> {/* ...otherwise modal.open() works just as well and is more versatile */}
46+
{/* You can also call modal.close() to programmatically close the modal */}
4747
</>
4848
);
4949
);
@@ -112,7 +112,7 @@ const modal = createModal({
112112
function Template(args: ModalProps) {
113113
return (
114114
<>
115-
<Button nativeButtonProps={modal.buttonProps}>Open modal with</Button>
115+
<Button nativeButtonProps={modal.buttonProps}>Open modal (stateless approach)</Button>
116116
<Button onClick={() => modal.open()}>Open modal with modal.open()</Button>
117117
<modal.Component {...args} />
118118
</>

0 commit comments

Comments
 (0)