Skip to content

Commit 5e4602c

Browse files
Merge pull request #2 from ThomasLeconte/develop
Merge Develop
2 parents dbc1246 + 7ff1858 commit 5e4602c

File tree

11 files changed

+385
-262
lines changed

11 files changed

+385
-262
lines changed

README.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,12 @@ import vuetifyInstance from './plugins/vuetify' //Or wherever you have your vuet
1515
import {Vuetify3Dialog} from 'vuetify3-dialog'
1616

1717
const app = createApp(App)
18-
app.use(Vuetify3Dialog, { vuetify: vuetifyInstance }) //You must pass your vuetify instance as an option
18+
app.use(Vuetify3Dialog, {
19+
vuetify: vuetifyInstance, //You must pass your vuetify instance as an option
20+
defaults: {
21+
//You can pass default options for dialogs, dialog's card and snackbars here
22+
}
23+
})
1924
app.mount('#app')
2025
```
2126

@@ -88,3 +93,21 @@ this.$notify.info(
8893
})
8994
```
9095
There is 4 levels of severity : `info`, `success`, `warning` and `error`.
96+
97+
### SFC compatibility
98+
If you want to use this plugin in an SFC component, some methods are available. Working principe is the same as previous methods, and arguments are the same.
99+
```html
100+
<script setup>
101+
import { createDialog, warnDialog, confirmDialog } from 'vuetify3-dialog'
102+
import { createNotification, notifySuccess } from 'vuetify3-dialog'
103+
104+
if(true){
105+
createDialog({ title: "My title", text: "My dialog message" })
106+
.then((anwser) => {
107+
//Do something with the anwser corresponding to the key of the clicked button
108+
})
109+
110+
notifySuccess("My snackbar message")
111+
}
112+
</script>
113+
```

package-lock.json

Lines changed: 98 additions & 97 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vuetify3-dialog",
3-
"version": "1.0.3",
3+
"version": "1.1.0",
44
"description": "Vue 3 & Vuetify 3 plugin to create dialogs and toasts with Promises ",
55
"keywords": [
66
"vue",
@@ -26,10 +26,6 @@
2626
".": {
2727
"types": "./lib/index.d.ts",
2828
"import": "./lib/index.js"
29-
},
30-
"./lib": {
31-
"types": "./lib/index.d.ts",
32-
"import": "./lib/index.js"
3329
}
3430
},
3531
"scripts": {

0 commit comments

Comments
 (0)