-
-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(maz-ui): add new dialog plugin to display dialog modals programm…
…atically
- Loading branch information
1 parent
a80b354
commit 88b8603
Showing
30 changed files
with
876 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
--- | ||
title: useDialog | ||
description: Vue composable for handling dialog plugin in your components | ||
--- | ||
|
||
# {{ $frontmatter.title }} | ||
|
||
{{ $frontmatter.description }} | ||
|
||
::: warning | ||
You must install [dialog plugin](./../plugins/dialog.md#install) before use it | ||
::: | ||
|
||
::: tip | ||
More info about [dialog plugin](./../plugins/dialog.md) in its documentation | ||
::: | ||
|
||
## Usage | ||
|
||
<ComponentDemo> | ||
<MazBtn | ||
@click="openDialog" | ||
> | ||
Open Dialog | ||
</MazBtn> | ||
|
||
<template #code> | ||
|
||
```vue | ||
<template> | ||
<MazBtn @click="openDialog"> | ||
Open Dialog | ||
</MazBtn> | ||
</template> | ||
<script lang="ts" setup> | ||
import { useDialog } from 'maz-ui' | ||
const dialog = useDialog() | ||
function openDialog() { | ||
dialog.open({ | ||
title: 'Dialog title', | ||
message: 'Dialog message', | ||
}) | ||
} | ||
</script> | ||
``` | ||
|
||
</template> | ||
|
||
</ComponentDemo> | ||
|
||
<script lang="ts" setup> | ||
import { useDialog } from 'maz-ui' | ||
|
||
const dialog = useDialog() | ||
|
||
function openDialog() { | ||
dialog.open({ | ||
title: 'Dialog title', | ||
message: 'Dialog message', | ||
}) | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.