0.2.1 • Published 3 years ago

svelte-gh-hotkey v0.2.1

Weekly downloads
2
License
MIT
Repository
github
Last release
3 years ago

svelte-gh-hotkey

Simple Svelte action wrapping @github/hotkey taking care of the lifecycle.

Usage

use:hotkey={'j'} results in data-hotkey="j"

<script>
  import { hotkey } from "svelte-gh-hotkey";
  let count = 0;
</script>

<button on:click={() => count++} use:hotkey={'i'}>
    Press i to increment
</button>
{count}

Run example

Run on REPL

Run locally:

cd example
npm run dev

License

Distributed under the MIT license. See LICENSE for details.

0.2.1

3 years ago

0.2.0

4 years ago

0.1.0

4 years ago

0.0.1

4 years ago