Skip to content

Commit

Permalink
document local import method
Browse files Browse the repository at this point in the history
  • Loading branch information
mesqueeb authored Oct 1, 2021
1 parent 3a4712e commit d05b439
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ npm install @meforma/vue-toaster

## Import

You can install Toaster so it's usable globally:

```js
// In you main.js
// ... considering that your app creation is here
Expand All @@ -24,6 +26,16 @@ import Toaster from "@meforma/vue-toaster";
createApp(App).use(Toaster).mount("#app");
```

You can also import Toaster locally:

```js
import { createToaster } from "@meforma/vue-toaster";

const toaster = createToaster({ /* options */ });

toaster.show(`Hey! I'm here`);
```

## Usage

```js
Expand Down

0 comments on commit d05b439

Please sign in to comment.