@crave/farmblocks-popover

    2.2.34 • 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

    Keywords

    Install

    npm i @crave/farmblocks-popover

    DownloadsWeekly Downloads

    16

    Version

    2.2.34

    License

    MIT

    Unpacked Size

    32.2 kB

    Total Files

    7

    Last publish

    Collaborators

    • seocam
    • vnakamura
    • alcferreira
    • imwra
    • juliansotuyo