wop-toasty

Web Component built with Stencil to Show Dan Forden's Toasty from Mortal Kombat.

Usage no npm install needed!

<script type="module">
  import wopToasty from 'https://cdn.skypack.dev/wop-toasty';
</script>

README

Built With Stencil

wop-toasty

Web Component built with Stencil to Show Dan Forden's Toasty from Mortal Kombat. Based on rubentd/toasty.

Live Example

http://embed.plnkr.co/Qd4duF/

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/wop-toasty@0.1.7/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>