Sha256: b0c39b5992107a36297f0ed8f5159c8d5cf6dc268a4a841b1ba7e2f0e82fdf14
Contents?: true
Size: 836 Bytes
Versions: 23
Compression:
Stored size: 836 Bytes
Contents
import React, { useState } from 'react' import { Button, PbReactPopover, } from '../..' const PopoverClickInside = () => { 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="inside" offset placement="bottom" reference={popoverTrigger} shouldClosePopover={handleShouldClosePopover} show={showPopover} > {'Whoa. I\'m a popover.'} </PbReactPopover> ) } export default PopoverClickInside
Version data entries
23 entries across 23 versions & 1 rubygems