Aucune description

Jonathan 1e8769b197 v2.2.0 il y a 4 ans
dist dfab003e02 design improvements for toasts (more to come) il y a 4 ans
example dfab003e02 design improvements for toasts (more to come) il y a 4 ans
src dfab003e02 design improvements for toasts (more to come) il y a 4 ans
.babelrc 37d9c300b9 refactored structure & webpack il y a 5 ans
.gitignore 7a5230e223 feat: position top, bottom, left and right il y a 5 ans
.npmignore 7a5230e223 feat: position top, bottom, left and right il y a 5 ans
LICENCE.md b83424cf45 v2.1.2: security fixes and small bug fix il y a 4 ans
README.md bc30a78831 v2.2.0 il y a 4 ans
package-lock.json bc30a78831 v2.2.0 il y a 4 ans
package.json bc30a78831 v2.2.0 il y a 4 ans
webpack.config.js 12a029fd1b refactor: default timeout of 6 seconds if timeout not specified il y a 4 ans

README.md

toasters

Toast alerts/notifications (initially developed for Vue.js with a material-design style)

Installation

npm install --save --production toasters

Usage

HTML:

<div id="toasts-container" class="position-right position-bottom">
  <div id="toasts-content">
    <!-- toasts will be added or removed from here -->
  </div>
</div>

JS:

import Toast from "toasters";

new Toast({
  content: "Hello World",
  persistant: true
});

Preview:

preview of visible toast on webpage

Potential future additions

  • Design improvements
  • Error handling (i.e. you haven't provided any content for the toast)
  • Ability to parse markdown or html

Contributing

# install dependencies
npm install

# watch files for changes with webpack
npm run dev

# build for production with minification
npm run build