Sha256: a1e6b16fdc9c9daca92e07b4442ff09af4b7650bb765260e1513525a9cd0c10a

Contents?: true

Size: 803 Bytes

Versions: 135

Compression:

Stored size: 803 Bytes

Contents

/* @flow */

import React, { Node, useState } from 'react'
import { CircleIconButton, PbReactPopover } from '../../'

const FiltersPopoverProps = { children: Node }
const FiltersPopover = ({ children }: FiltersPopoverProps) => {
  const [hide, updateHide] = useState(true)
  const toggle = () => updateHide(!hide)

  const filterButton = (
    <CircleIconButton
        icon="filter"
        id="filter"
        onClick={toggle}
        text="filter"
        variant="secondary"
    />
  )

  return (
    <PbReactPopover
        closeOnClick="outside"
        placement="bottom"
        reference={filterButton}
        shouldClosePopover={updateHide}
        show={!hide}
    >
      <div className="pb-form">
        {children}
      </div>
    </PbReactPopover>
  )
}

export default FiltersPopover

Version data entries

135 entries across 135 versions & 1 rubygems

Version Path
playbook_ui-7.7.0.pre.alpha1 app/pb_kits/playbook/pb_filter/Filter/FiltersPopover.jsx
playbook_ui-7.7.0 app/pb_kits/playbook/pb_filter/Filter/FiltersPopover.jsx
playbook_ui-7.6.2.pre.alpha1 app/pb_kits/playbook/pb_filter/Filter/FiltersPopover.jsx
playbook_ui-7.6.2 app/pb_kits/playbook/pb_filter/Filter/FiltersPopover.jsx
playbook_ui-7.6.1.pre.alpha1 app/pb_kits/playbook/pb_filter/Filter/FiltersPopover.jsx
playbook_ui-7.6.1 app/pb_kits/playbook/pb_filter/Filter/FiltersPopover.jsx
playbook_ui-7.6.0 app/pb_kits/playbook/pb_filter/Filter/FiltersPopover.jsx
playbook_ui-7.5.1 app/pb_kits/playbook/pb_filter/Filter/FiltersPopover.jsx
playbook_ui-7.5.0 app/pb_kits/playbook/pb_filter/Filter/FiltersPopover.jsx
playbook_ui-7.4.2 app/pb_kits/playbook/pb_filter/Filter/FiltersPopover.jsx
playbook_ui-7.4.1 app/pb_kits/playbook/pb_filter/Filter/FiltersPopover.jsx
playbook_ui-7.4.0.pre.alpha6 app/pb_kits/playbook/pb_filter/Filter/FiltersPopover.jsx
playbook_ui-7.4.0.pre.alpha5 app/pb_kits/playbook/pb_filter/Filter/FiltersPopover.jsx
playbook_ui-7.4.0 app/pb_kits/playbook/pb_filter/Filter/FiltersPopover.jsx
playbook_ui-7.4.0.pre.test4 app/pb_kits/playbook/pb_filter/Filter/FiltersPopover.jsx
playbook_ui-7.4.0.pre.test3 app/pb_kits/playbook/pb_filter/Filter/FiltersPopover.jsx
playbook_ui-7.4.0.pre.test2 app/pb_kits/playbook/pb_filter/Filter/FiltersPopover.jsx
playbook_ui-7.4.0.pre.alpha4 app/pb_kits/playbook/pb_filter/Filter/FiltersPopover.jsx
playbook_ui-7.4.0.pre.alpha2 app/pb_kits/playbook/pb_filter/Filter/FiltersPopover.jsx
playbook_ui-7.4.0.pre.alpha1 app/pb_kits/playbook/pb_filter/Filter/FiltersPopover.jsx