Skip to content

v3.0.0

Latest
Compare
Choose a tag to compare
@huozhi huozhi released this 02 Nov 01:34
· 3 commits to main since this release

V3

Redesign the API usePopover to a hook with much simpler usage which has easier mindset of usage

import { usePopover } from 'react-overlay-trigger'

const App = () => {
  const { popover, triggerProps } = usePopover({
    placement: 'top',
    hoverToggle: true,
  })

  return (
    <div>
      {popover}
      <button {...triggerProps}>hover me</button>
    </div>
  )
}

Checkout the readme and website for more details