@gits-id/toast-store
TypeScript icon, indicating that this package has built-in type declarations

1.0.0-beta.3 • Public • Published

Toast Store

Store module for @gits-id/toast.

Installation

# With NPM
npm i @gits-id/toast
# With Yarn
yarn add @gits-id/toast
# With PNPM
pnpm add @gits-id/toast

Usage

Composition API

import {useToast} from '@gits-id/toast-store'

const toast = useToast()
toast.show()
toast.confirm()
toast.confirmDelete()

Pinia

// file: stores/toast.ts

import {useToastStore} from '@gits-id/toast-store'

const toast = useToastStore()

toast.show()
toast.confirm()
toast.confirmDelete()

Vuex (Recommended)

// file: store/index.ts
import {toastModule} from '@gits-id/toast-store'

export default new Vuex({
  modules: {
    toast: toastModule
  }
})
<script setup>
const store = useStore()

store.toast.show()
store.toast.confirm()
store.toast.confirmDelete()
</script>

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i @gits-id/toast-store

Weekly Downloads

0

Version

1.0.0-beta.3

License

MIT

Unpacked Size

18.5 kB

Total Files

23

Last publish

Collaborators

  • gravitano