Sha256: 79457eebeea1b1d11f68c0486052f478ba868e73456c4feb8a33dce01bda29df
Contents?: true
Size: 1.18 KB
Versions: 246
Compression:
Stored size: 1.18 KB
Contents
import React, { useState } from 'react' import { Body, Button, CircleIconButton, Flex, PbReactPopover, } from '../..' const PopoverActionableContent = (props) => { const [showPopover, setShowPopover] = useState(false) const handleTogglePopover = () => { setShowPopover(!showPopover) } const handleShouldClosePopover = (shouldClose) => { setShowPopover(!shouldClose) } const popoverReference = ( <CircleIconButton icon="info" onClick={handleTogglePopover} variant="secondary" /> ) return ( <Flex orientation="row" vertical="center" {...props} > <Body text="Click info for more details" /> <PbReactPopover closeOnClick="inside" offset placement="top" reference={popoverReference} shouldClosePopover={handleShouldClosePopover} show={showPopover} {...props} > <Body textAlign="center"> <Button onClick={() => {alert("Let's do this!")}} text="Learn More" /> </Body> </PbReactPopover> </Flex> ) } export default PopoverActionableContent
Version data entries
246 entries across 246 versions & 2 rubygems