@cthacker/overlaytriggerinject
TypeScript icon, indicating that this package has built-in type declarations

2.2.1 • Public • Published

React-Bootstrap OverlayTrigger Wrapper.

Benefits:

  • Less boilerplate code
  • More customization options
    • Display while hovering over tooltip customization
    • Override props without providing boilerplate function
  • Compatible with NextJS 13+

Specifications

  • Language
    • Typescript
  • Framework
    • React >18+
Props Descriptions
  • delay OverlayDelay: { hide: number, show: number }
    • The applied react-bootstrap property for the OverlayTrigger component
      • {{ hide: <ms>, show: <ms> }}
  • displayWhileHover boolean
    • Custom prop, allows for the tooltip to stay visible while the user is hovering over it, and then disappears when the tooltip loses focus.
  • onToggle (_nextShow: boolean) => void inherited from react-bootstrap's OverlayTrigger onToggle callback specification
    • _nextShow: The next boolean value that will be applied to the state of the component _nextShow = true --> the component is "showing"
  • placement Placement: AutoPlacement | BasePlacement | VariantPlacement inherited from react-bootstrap's OverlayTrigger Placement type specification, basically an string enum
    • Controls the placement of the tooltip relative to it's wrapped children
  • show boolean
    • The most important value, controls whether the Tooltip is shown or not on the screen, or inserted into the DOM.
      • show = true --> tooltip is showing
      • show = false --> tooltip is not showing
  • title string | ReactNode
    • The contents of the tooltip, fully customizable, can either be a raw string, or a complex ReactNode component
  • trigger OverlayTriggerType | OverlayTriggerType[] inherited from react-bootstrap's OverlayTrigger specifications

Package Sidebar

Install

npm i @cthacker/overlaytriggerinject

Weekly Downloads

2

Version

2.2.1

License

ISC

Unpacked Size

137 kB

Total Files

29

Last publish

Collaborators

  • cthacker