Skip to content

Commit f109e42

Browse files
authored
chore: add story (#15)
1 parent b04fdcc commit f109e42

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

src/components/DatePicker/__stories__/DatePicker.stories.tsx

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22

33
import {dateTimeParse} from '@gravity-ui/date-utils';
4-
import {Tabs} from '@gravity-ui/uikit';
4+
import {Button, Dialog, Tabs} from '@gravity-ui/uikit';
55
import {toaster} from '@gravity-ui/uikit/toaster-singleton-react-18';
66
import type {Meta, StoryObj} from '@storybook/react';
77

@@ -120,3 +120,27 @@ export const WithCustomCalendar = {
120120
});
121121
},
122122
} satisfies Story;
123+
124+
export const InsideDialog = {
125+
...Default,
126+
render: function InsideDialog(args) {
127+
const [isOpen, setOpen] = React.useState(false);
128+
return (
129+
<React.Fragment>
130+
<Button
131+
onClick={() => {
132+
setOpen(true);
133+
}}
134+
>
135+
Open dialog
136+
</Button>
137+
<Dialog open={isOpen} onClose={() => setOpen(false)}>
138+
<Dialog.Header />
139+
<Dialog.Body>
140+
<div style={{paddingTop: 16}}>{Default.render(args)}</div>
141+
</Dialog.Body>
142+
</Dialog>
143+
</React.Fragment>
144+
);
145+
},
146+
} satisfies Story;

0 commit comments

Comments
 (0)