Skip to content

Commit 69c0b21

Browse files
committed
docs: add docs for the afcl modal
1 parent fc9ed25 commit 69c0b21

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

adminforth/documentation/docs/tutorial/03-Customization/15-afcl.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2317,6 +2317,44 @@ import { JsonViewer } from '@/afcl'
23172317
</div>
23182318
</div>
23192319

2320+
## Modal
2321+
2322+
<div class="split-screen" >
2323+
<div>
2324+
2325+
```ts
2326+
import { Modal, Button } from '@/afcl';
2327+
```
2328+
2329+
```html
2330+
<Modal class="w-96" :closeByClickOutside="true" :closeByEsc="true" askForCloseConfirmation >
2331+
<template #trigger>
2332+
<Button>Modal Toggle</Button>
2333+
</template>
2334+
2335+
<div class="space-y-4 p-4">
2336+
<p>This is the first paragraph of modal content.</p>
2337+
<p>And this is the second paragraph.</p>
2338+
</div>
2339+
</Modal>
2340+
```
2341+
</div>
2342+
<div>
2343+
![AFCL Dialog](image-98.png)
2344+
</div>
2345+
</div>
2346+
2347+
### Props:
2348+
```ts
2349+
closeByClickOutside?: boolean // Close on click outside of modal (default is true)
2350+
closeByEsc?: boolean // Close on Esc button click (default is true)
2351+
beforeCloseFunction?: (() => void | Promise<void>) | null // Callback, that will be executed before open
2352+
beforeOpenFunction?: (() => void | Promise<void>) | null // Callback, that will be executed before close
2353+
askForCloseConfirmation?: boolean // Show extra popup to confirm close ( to avoid close by accident)
2354+
closeConfirmationText?: string // Text that will be shown on close confirmation popup
2355+
removeFromDomOnClose?: boolean // Remove modal from DOM on close ( default is false )
2356+
```
2357+
23202358
## Date picker
23212359

23222360
```ts
13.2 KB
Loading

0 commit comments

Comments
 (0)