Нет описания

Jonathan 3815e772ee v2.2.1 4 лет назад
dist 1005b29f59 v2.2.1 4 лет назад
example 1005b29f59 v2.2.1 4 лет назад
src dfab003e02 design improvements for toasts (more to come) 4 лет назад
.babelrc 37d9c300b9 refactored structure & webpack 5 лет назад
.gitignore 7a5230e223 feat: position top, bottom, left and right 5 лет назад
.npmignore 7a5230e223 feat: position top, bottom, left and right 5 лет назад
LICENCE.md b83424cf45 v2.1.2: security fixes and small bug fix 4 лет назад
README.md 1005b29f59 v2.2.1 4 лет назад
package-lock.json 1005b29f59 v2.2.1 4 лет назад
package.json 1005b29f59 v2.2.1 4 лет назад
webpack.config.js 12a029fd1b refactor: default timeout of 6 seconds if timeout not specified 4 лет назад

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",
  persistent: 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