Mobile haptic feedback

This commit is contained in:
space-nuko
2023-05-07 16:56:16 -05:00
parent 6dd2627f2c
commit 8ec2301093
9 changed files with 112 additions and 25 deletions

View File

@@ -20,6 +20,10 @@
attrsChanged = widget.attrsChanged;
}
};
function onSelect() {
navigator.vibrate(20)
}
</script>
<div class="wrapper gradio-checkbox">
@@ -27,7 +31,7 @@
{#key $attrsChanged}
{#if node !== null}
<Block>
<Checkbox disabled={widget.attrs.disabled} label={widget.attrs.title} bind:value={$nodeValue} />
<Checkbox disabled={widget.attrs.disabled} label={widget.attrs.title} bind:value={$nodeValue} on:select={onSelect} />
</Block>
{/if}
{/key}