docs(modal): provide an example to bind event listeners (#1611)

This commit is contained in:
Neil Richter
2024-04-10 17:15:39 +02:00
committed by GitHub
parent 07a4d13c0f
commit d19d7077e4
4 changed files with 34 additions and 4 deletions

View File

@@ -77,7 +77,13 @@ First of all, add the `Modals` component to your app, preferably inside `app.vue
Then, you can use the `useModal` composable to control your modals within your app.
:component-example{component="modal-example-composable"}
<!-- For prerendering -->
:component-example{component="modal-example-component" hiddenCode hiddenPreview }
::code-group{class="[&>div:last-child>div:first-child]:!rounded-t-none"}
:component-example{component="modal-example-composable" label="app.vue" }
:component-example{component="modal-example-component" hiddenPreview label="modal.vue" }
::
Additionally, you can close the modal within the modal component by calling `modal.close()`.