@tadashi/svelte-pesquisa
v2.0.0
Published
Svelte components
Downloads
34
Maintainers
Readme
pesquisa-webcomponent
Svelte component
Install
$ npm i -S @tadashi/svelte-pesquisa
Usage
Example: https://codepen.io/lagden/pen/oNezyyv?editors=1010
<script type="module" src="https://unpkg.com/@tadashi/svelte-pesquisa@{VERSION}/dist/Pesquisa.js"></script>
<tadashi-pesquisa
endpoint="https://ws.apicep.com/cep.json"
prop="code"
method="get"
>
<input type="text" name="q">
</tadashi-pesquisa>
<script>
const pesquisa = document.querySelector('tadashi-pesquisa')
pesquisa.addEventListener('response', console.log)
</script>
License
MIT © Thiago Lagden