wop-toasty
v0.1.7
Published
Web Component built with Stencil to Show Dan Forden's Toasty from Mortal Kombat.
Downloads
16
Readme
wop-toasty
Web Component built with Stencil to Show Dan Forden's Toasty from Mortal Kombat. Based on rubentd/toasty.
Live Example
Getting Started
To try this component:
git clone https://github.com/gringonivoli/wop-toasty.git my-app
cd my-app
git remote rm origin
and run:
npm install
npm start
Using this component
Script tag
- Put this script tag
<script async defer src="https://unpkg.com/[email protected]/dist/woptoasty.js"></script>
in the head of your index.html
Node Modules
- Run
npm install wop-toasty --save
- Put a script tag similar to this
<script src='node_modules/wop-toasty/dist/woptoasty.js'></script>
in the head of your index.html
In a stencil-starter app
- Run
npm install wop-toasty --save
- Add
{ name: 'wop-toasty' }
to your collections
Examples
<button onClick="toasty.show()">Show Toasty!</button>
<wop-toasty></wop-toasty>
<script>
const toasty = document.querySelector('wop-toasty');
</script>