8000 GitHub - sgenoud/quarolib: Not a library of hooks, components and help to reuse as much as I like
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

sgenoud/quarolib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QuaroLib

Some code that can be reused across many different projects. The aim is to not create libraries that need to support all uses cases.

The base code is here, if something more specific needs to be built, then modify the code. Nevertheless pull requests to fix bugs in the code are always welcome.

What is in there

Helper to create tooltips
  • hooks/usePopper.js: glue code between popper.js and React. Read more about is here

  • components/Tooltip.jsx: the base styled components for building tooltips

Hooks for simple, well defined, tasks
  • hooks/useOutsideCallback.js: hooks to defined a callback that will be called when a user clicks outside a list of targets. What is different about this implementation is that you can define an array of nodes that are considered the "inside".

  • hooks/useMousetrap.js: hooks to bind to a mousetrap instance (for simple keyboard shortcuts creation.)

  • hooks/useToggle.js: store and offer the base options to change the state of a boolean (on, off, toggle).

About

Not a library of hooks, components and help to reuse as much as I like

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0