Replace long press with tap target
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
<script lang="ts">
|
||||
import {isMobile} from "@lib/html"
|
||||
|
||||
const {children, onTap, ...restProps} = $props()
|
||||
|
||||
const onclick = (event: MouseEvent) => {
|
||||
if (isMobile) {
|
||||
onTap(event)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<div role="button" tabindex="0" {onclick} {...restProps}>
|
||||
{@render children()}
|
||||
</div>
|
||||
Reference in New Issue
Block a user