@crave/farmblocks-popover

2.2.37 • Public • Published

Farmblocks popover

A customisable popover component

2018-06-15 11 22 29

Installation

npm install @crave/farmblocks-popover

Usage

<Popover
  trigger={<button>Trigger</button>}
  content={dismiss => (
    <div>
      <Text>Popover content</Text>
      <button onClick={dismiss}>Dismiss</button>
    </div>
  )}
/>

API

Property Description Type Required Default
trigger A node that will be popover's trigger. Can also be a function that receives isVisible state and returns a node node or func => node Yes
content A render function with the contents to be displayed on the popover func => node Yes
tooltipProps Props to be passed to Tooltip component object
triggerWidth A CSS value for the trigger container width string auto
onOpen called when the popover opens func
onBeforeOpen called before the popover opens. If the given function returns a Promise, the popover will wait until it resolve to open func
onClose called when the popover closes func
disabled prevents the popover to open when the trigger is clicked. bool false

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i @crave/farmblocks-popover

Weekly Downloads

6

Version

2.2.37

License

MIT

Unpacked Size

9.76 kB

Total Files

6

Last publish

Collaborators

  • viniciusmartin
  • luis.nascimento
  • seocam
  • vnakamura
  • alcferreira
  • imwra