@meforma/vue-toaster
Advanced tools
Comparing version 1.2.2 to 1.3.0
{ | ||
"name": "@meforma/vue-toaster", | ||
"version": "1.2.2", | ||
"version": "1.3.0", | ||
"description": "Vue.js toaster notification", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -19,2 +19,4 @@ # Vue Toaster | ||
You can install Toaster so it's usable globally: | ||
```js | ||
@@ -28,2 +30,12 @@ // In you main.js | ||
You can also import Toaster locally: | ||
```js | ||
import { createToaster } from "@meforma/vue-toaster"; | ||
const toaster = createToaster({ /* options */ }); | ||
toaster.show(`Hey! I'm here`); | ||
``` | ||
## Usage | ||
@@ -30,0 +42,0 @@ |
import Toaster from './Toaster.vue' | ||
import Api from './api.js' | ||
import createToaster from './api.js' | ||
import Positions from './defaults/positions.js' | ||
const Plugin = (app, options = {}) => { | ||
let methods = Api(options) | ||
let methods = createToaster(options) | ||
app.$toast = methods | ||
@@ -14,2 +14,2 @@ app.config.globalProperties.$toast = methods | ||
export default Toaster | ||
export { Toaster, Positions } | ||
export { Toaster, Positions, createToaster } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15731
130