UNPKG

867 BSource Map (JSON)View Raw
1{"version":3,"sources":["useMouse.js"],"names":["useMouse","ref","state","events"],"mappings":";;;;;;;AAAA;;AACA;;;;AAOA,IAAMA,QAAQ,GAAG,SAAXA,QAAW,GAAgB;AAAA,MAAfC,GAAe,uEAAT,IAAS;AAC/B,MAAMC,KAAK,GAAG,+BAAcD,GAAd,CAAd;AACA,MAAME,MAAM,GAAG,gCAAeF,GAAf,CAAf;AAEA,SAAO,CAACC,KAAD,EAAQC,MAAR,CAAP;AACD,CALD;;eAOeH,Q","sourcesContent":["import useMouseEvents from './useMouseEvents';\nimport useMouseState from './useMouseState';\n\n/**\n * Returns an array where the first item is the mouse state from the `useMouseState` hook and the second item\n * is the object of callback setters from the `useMouseEvents` hook.\n * It is intended as a shortcut to those hooks.\n */\nconst useMouse = (ref = null) => {\n const state = useMouseState(ref);\n const events = useMouseEvents(ref);\n\n return [state, events];\n};\n\nexport default useMouse;\n"],"file":"useMouse.js"}
\No newline at end of file