This commit is contained in:
nik
2025-10-03 22:27:28 +03:00
parent 829fad0e17
commit 871cf7e792
16520 changed files with 2967597 additions and 3 deletions

View File

@@ -0,0 +1 @@
import{useRef as l}from"react";import{MouseButton as f}from'../components/mouse.js';import{isDisabledReactIssue7711 as n}from'../utils/bugs.js';import{useEvent as o}from'./use-event.js';function s(t){let r=l(null),u=o(e=>{r.current=e.pointerType,!n(e.currentTarget)&&e.pointerType==="mouse"&&e.button===f.Left&&(e.preventDefault(),t(e))}),i=o(e=>{r.current!=="mouse"&&(n(e.currentTarget)||t(e))});return{onPointerDown:u,onClick:i}}export{s as useHandleToggle};