Sha256: 8b981d7836e119c0ad6a8a404eae5863ba63f578dea1ed7b76dc7cef88a0374d
Contents?: true
Size: 829 Bytes
Versions: 8
Compression:
Stored size: 829 Bytes
Contents
/* @flow */ import React, { Node, useState } from 'react' import { CircleIconButton, PbReactPopover } from '../../' const FiltersPopoverProps = { children: Node } const FiltersPopover = ({ children, dark }: FiltersPopoverProps) => { const [hide, updateHide] = useState(true) const toggle = () => updateHide(!hide) const filterButton = ( <CircleIconButton dark={dark} 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
8 entries across 8 versions & 1 rubygems