Skip to content

Commit 56fe959

Browse files
committed
docs(CozyDialogs): Add inner dialog
1 parent c322ba6 commit 56fe959

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

react/CozyDialogs/Readme.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ const hideBottomSheet = () => setState({ bottomSheetOpened: false })
9292
const showBottomSheet = () => setState({ bottomSheetOpened: true })
9393
const hideSecondConfirmDialog = () => setState({ secondConfirmDialogOpened: false })
9494
const showSecondConfirmDialog = () => setState({ secondConfirmDialogOpened: true })
95+
const hideSecondDialog = () => setState({ secondDialogOpened: false })
96+
const showSecondDialog = () => setState({ secondDialogOpened: true })
9597
const hideBSConfirmDialog = () => setState({ BSConfirmDialogOpened: false })
9698
const showBSConfirmDialog = () => setState({ BSConfirmDialogOpened: true })
9799

@@ -188,6 +190,7 @@ initialState = {
188190
modalOpened: isTesting(),
189191
bottomSheetOpened: false,
190192
secondConfirmDialogOpened: false,
193+
secondDialogOpened: false,
191194
BSConfirmDialogOpened: false,
192195
modal: Dialog,
193196
size: 'medium',
@@ -323,6 +326,9 @@ const initialVariants = [{
323326
<div>
324327
<Button label="Show inner confirm dialog" onClick={showSecondConfirmDialog}/>
325328
</div>
329+
<div>
330+
<Button label="Show inner dialog" onClick={showSecondDialog}/>
331+
</div>
326332
</Stack>
327333
</Typography>
328334

@@ -333,6 +339,13 @@ const initialVariants = [{
333339
/>
334340
)}
335341

342+
{state.secondDialogOpened && (
343+
<Dialog open onClose={hideSecondDialog}
344+
title="This is a simple title"
345+
content="This is a simple content"
346+
/>
347+
)}
348+
336349
{state.bottomSheetOpened && (
337350
<BottomSheet backdrop onClose={hideBottomSheet}>
338351
<BottomSheetItem>

0 commit comments

Comments
 (0)