vue-nt-toast 0.1.4 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -63,19 +63,21 @@ app.use(NtToast, defaultOptions)
63
63
 
64
64
  ```javascript
65
65
  // get Proxy in current instance
66
- import { getCurrentInctance } from 'vue';
67
-
66
+ // import { getCurrentInctance } from 'vue';
67
+ import { inject } from 'vue'
68
68
  // composition api or setup
69
- const { proxy } = getCurrentInstance();
69
+ // const { proxy } = getCurrentInstance();
70
+
71
+ const toast = inject('$ntToast')
70
72
  ```
71
73
  ### Creating toast (Show toast)
72
74
  ```javascript
73
75
  // show success toast
74
- proxy.$ntToast.show('success', ..., ...)
76
+ toast.show('success', ..., ...)
75
77
 
76
78
  // show another type
77
- proxy.$ntToast.show('info', ..., ...)
78
- proxy.$ntToast.show('danger', ..., ...)
79
+ toast.show('info', ..., ...)
80
+ toast.show('danger', ..., ...)
79
81
  ```
80
82
  ---
81
83