@signainfo/stoast

npm i --save @signainfo/stoast

Usage no npm install needed!

<script type="module">
  import signainfoStoast from 'https://cdn.skypack.dev/@signainfo/stoast';
</script>

README

SToast component

Installation

npm i --save @signainfo/stoast

Usage

It can be installed globally using:

import Vue from 'vue'
import SToast from '@signainfo/stoast'
import '@signainfo/stoast/dist/stoast.css'
...

Vue.use(SToast)

...

or used on demand:

<script>
import SToast from '@signainfo/stoast'
export default {
  name: 'App',
  components: {
    's-toast': SToast
  },
  data() {
    ...
  }
}
</script>

and use inside the template tag:

<template>
  ...
  <s-toast v-model="toast.show" :color="toast.color" :message="toast.message" :time="toast.time" />
  ...
</template>

Props:

props: {
    value: {
      type: Boolean,
      required: true,
      default: ''
    },
    message: {
      type: String,
      required: true,
      default: ''
    },
    color: {
      type: String,
      required: false,
      default: 'success'
    },
    time: {
      type: Number,
      required: false,
      default: 2000
    }
}

Development

npm start // start the test app
npm run build // builds the component and publish to npm

Before building the component you need to advance the version using npm semver:

npm version patch // to patch version
npm version minor // to minor version
npm version major // to major version