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-5.2.0.pre.alpha5 app/pb_kits/playbook/pb_filter/Filter/FiltersPopover.jsx
playbook_ui-5.3.0 app/pb_kits/playbook/pb_filter/Filter/FiltersPopover.jsx
playbook_ui-5.2.0.pre.alpha4 app/pb_kits/playbook/pb_filter/Filter/FiltersPopover.jsx
playbook_ui-5.2.0.pre.alpha3 app/pb_kits/playbook/pb_filter/Filter/FiltersPopover.jsx
playbook_ui-5.2.0.pre.alpha2 app/pb_kits/playbook/pb_filter/Filter/FiltersPopover.jsx
playbook_ui-5.2.0 app/pb_kits/playbook/pb_filter/Filter/FiltersPopover.jsx
playbook_ui-5.1.0 app/pb_kits/playbook/pb_filter/Filter/FiltersPopover.jsx
playbook_ui-5.0.3 app/pb_kits/playbook/pb_filter/Filter/FiltersPopover.jsx
playbook_ui-5.0.2 app/pb_kits/playbook/pb_filter/Filter/FiltersPopover.jsx
playbook_ui-5.0.1.pre.beta app/pb_kits/playbook/pb_filter/Filter/FiltersPopover.jsx
playbook_ui-5.1.0.pre.alpha4 app/pb_kits/playbook/pb_filter/Filter/FiltersPopover.jsx
playbook_ui-5.1.0.pre.alpha2 app/pb_kits/playbook/pb_filter/Filter/FiltersPopover.jsx
playbook_ui-5.1.0.pre.alpha1 app/pb_kits/playbook/pb_filter/Filter/FiltersPopover.jsx
playbook_ui-5.0.1 app/pb_kits/playbook/pb_filter/Filter/FiltersPopover.jsx
playbook_ui-5.0.1.pre.alpha1 app/pb_kits/playbook/pb_filter/Filter/FiltersPopover.jsx