Sha256: b45a982787fb096dbcc9ccec9e6da84f8e46f12ad21709c332f78fb5ab2a6900

Contents?: true

Size: 898 Bytes

Versions: 948

Compression:

Stored size: 898 Bytes

Contents

import React, { useState } from 'react'
import {
  Body,
  CircleIconButton,
  Flex,
  PbReactPopover,
} from 'playbook-ui'

const PopoverDefault = (props) => {
  const [showPopover, setShowPopover] = useState(false)

  const handleTogglePopover = () => {
    setShowPopover(!showPopover)
  }
  const popoverReference = (
    <CircleIconButton
        icon="info"
        onClick={handleTogglePopover}
        variant="secondary"
    />
  )

  return (
    <Flex
        orientation="row"
        vertical="center"
        {...props}
    >
      <Body text="Click info for more details" />
      &nbsp;
      <PbReactPopover
          offset
          placement="top"
          reference={popoverReference}
          show={showPopover}
          {...props}
      >
        {'I\'m a popover. I can show content of any size.'}
      </PbReactPopover>
    </Flex>
  )
}

export default PopoverDefault

Version data entries

948 entries across 948 versions & 2 rubygems

Version Path
playbook_ui_docs-14.11.1.pre.alpha.PLAY17445539 app/pb_kits/playbook/pb_popover/docs/_popover_default.jsx
playbook_ui-14.11.1.pre.alpha.PLAY17445539 app/pb_kits/playbook/pb_popover/docs/_popover_default.jsx
playbook_ui_docs-14.11.1.pre.alpha.PBNTR798datepickerturbo5537 app/pb_kits/playbook/pb_popover/docs/_popover_default.jsx
playbook_ui-14.11.1.pre.alpha.PBNTR798datepickerturbo5537 app/pb_kits/playbook/pb_popover/docs/_popover_default.jsx
playbook_ui_docs-14.11.1.pre.alpha.pbntr703collapsiblerowsrails5536 app/pb_kits/playbook/pb_popover/docs/_popover_default.jsx
playbook_ui-14.11.1.pre.alpha.pbntr703collapsiblerowsrails5536 app/pb_kits/playbook/pb_popover/docs/_popover_default.jsx
playbook_ui_docs-14.11.1.pre.alpha.PLAY1751pbcontenttagpt25529 app/pb_kits/playbook/pb_popover/docs/_popover_default.jsx
playbook_ui-14.11.1.pre.alpha.PLAY1751pbcontenttagpt25529 app/pb_kits/playbook/pb_popover/docs/_popover_default.jsx
playbook_ui_docs-14.11.1.pre.alpha.PBNTR7495495 app/pb_kits/playbook/pb_popover/docs/_popover_default.jsx
playbook_ui-14.11.1.pre.alpha.PBNTR7495495 app/pb_kits/playbook/pb_popover/docs/_popover_default.jsx
playbook_ui_docs-14.12.0.pre.rc.11 app/pb_kits/playbook/pb_popover/docs/_popover_default.jsx
playbook_ui-14.12.0.pre.rc.11 app/pb_kits/playbook/pb_popover/docs/_popover_default.jsx
playbook_ui_docs-14.12.0.pre.rc.10 app/pb_kits/playbook/pb_popover/docs/_popover_default.jsx
playbook_ui-14.12.0.pre.rc.10 app/pb_kits/playbook/pb_popover/docs/_popover_default.jsx
playbook_ui_docs-14.12.0.pre.rc.9 app/pb_kits/playbook/pb_popover/docs/_popover_default.jsx
playbook_ui-14.12.0.pre.rc.9 app/pb_kits/playbook/pb_popover/docs/_popover_default.jsx
playbook_ui_docs-14.12.0.pre.rc.8 app/pb_kits/playbook/pb_popover/docs/_popover_default.jsx
playbook_ui-14.12.0.pre.rc.8 app/pb_kits/playbook/pb_popover/docs/_popover_default.jsx
playbook_ui_docs-14.12.0.pre.rc.7 app/pb_kits/playbook/pb_popover/docs/_popover_default.jsx
playbook_ui-14.12.0.pre.rc.7 app/pb_kits/playbook/pb_popover/docs/_popover_default.jsx