Socket
Book a DemoInstallSign in
Socket

ceri-toaster

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ceri-toaster

toasts, quick and easy

latest
Source
npmnpm
Version
0.2.0
Version published
Maintainers
1
Created
Source

ceri-toaster

toasts, quick and easy

Demo

Install

npm install --save-dev ceri-toaster

Usage

Toaster = require("ceri-toaster")
# load the theme (see below)
window.customElements.define("ceri-toaster", Toaster(require("ceri-toaster/materialize")))
toaster = document.createElement("ceri-toaster")
document.body.appendChild(toaster)
toaster.toast({text:"Hello!", timeout: 5000, onClose: => return})

Mixin

the toaster can be used as a mixin within other ceri components:

  ...
  mixins: [
    require("ceri-toaster/mixin")(require("ceri-toaster/materialize"))
  ]
  ...
  methods:
    doSomething: ->
      close = @$toast({text:"Hello!", timeout: 5000})
      close() 

Themes

Materialize

  • setup ceri-materialize and load the scss.
// and this additional requirement
@import "~ceri-toaster/materialize";
  • load theme file
Toaster = require("ceri-toaster")
window.customElements.define("ceri-toaster", Toaster(require("ceri-toaster/materialize")))

For example see dev/materialize.

Development

Clone repository

npm install
npm run dev

Browse to http://localhost:8080/.

Notable changes

0.2.0

  • use ceri-materialize@2

License

Copyright (c) 2017 Paul Pflugradt Licensed under the MIT license.

Keywords

toaster

FAQs

Package last updated on 07 Sep 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts