1.0.4 • Published 4 years ago

@woden/svelte-click-outside v1.0.4

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

svelte-click-outside

An action that provides click outside detection for Svelte

Installation

Npm

npm install --save @woden/svelte-click-outside

Yarn

yarn add @woden/svelte-click-outside

Basic Usage

Import the package and use it as an action, provide a parameter which is the action you would like to fire when clickOutside is detected

<script>
import clickOutside from '@woden/svelte-click-outside'

const myFunction = () => console.log('this will be displayed if I click outside the button')
</script>

<button use:clickOutside={myFunction}>My super button</button>
1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago