Sha256: 4249c08e7433287c83a0ddf40fc298575425967f7aff3f23dc994e7d95f1e0d2
Contents?: true
Size: 827 Bytes
Versions: 23
Compression:
Stored size: 827 Bytes
Contents
import React, { useState } from 'react' import { Button, PbReactPopover, } from '../..' const PopoverClickAny = () => { const [showPopover, setShowPopover] = useState(false) const handleTogglePopover = () => { setShowPopover(!showPopover) } const handleShouldClosePopover = (shouldClosePopover) => { setShowPopover(!shouldClosePopover) } const popoverTrigger = ( <Button onClick={handleTogglePopover} text="Button Secondary" variant="secondary" /> ) return ( <PbReactPopover closeOnClick="any" offset placement="bottom" reference={popoverTrigger} shouldClosePopover={handleShouldClosePopover} show={showPopover} > {'Whoa. I\'m a popover.'} </PbReactPopover> ) } export default PopoverClickAny
Version data entries
23 entries across 23 versions & 1 rubygems