Sha256: dd5175e8ad01f5cd6e440c26083bb285f90dff8205cc0f82db52f8b7eb829338

Contents?: true

Size: 1.47 KB

Versions: 700

Compression:

Stored size: 1.47 KB

Contents

import React, { useState } from 'react'
import {
  Body,
  Button,
  PbReactPopover,
  Title,
} from 'playbook-ui'

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

  const handleTogglePopover = () => {
    setShowPopover(!showPopover)
  }

  const handleShouldClosePopover = (shouldClosePopover) => {
    setShowPopover(!shouldClosePopover)
  }

  const popoverTrigger = (
    <Button
        onClick={handleTogglePopover}
        text="Click Me"
        variant="secondary"
    />
  )

  return (
    <PbReactPopover
        closeOnClick="any"
        maxHeight="150px"
        maxWidth="240px"
        offset
        padding="md"
        paddingBottom="sm"
        paddingTop="sm"
        placement="top"
        reference={popoverTrigger}
        shouldClosePopover={handleShouldClosePopover}
        show={showPopover}
        {...props}
    >
      <Body
          marginBottom="sm"
          text="So many people live within unhappy circumstances and yet will
          not take the initiative to change their situation because they are
          conditioned to a life of security, conformity, and conservation, all of
          which may appear to give one peace of mind, but in reality, nothing is
          more damaging to the adventurous spirit."
          {...props}
      />
      <Title
          size={4}
          text="- Christopher McCandless"
          {...props}
      />

    </PbReactPopover>
  )
}

export default PopoverScrollHeight

Version data entries

700 entries across 700 versions & 2 rubygems

Version Path
playbook_ui-14.8.0.pre.alpha.PLAY16254545 app/pb_kits/playbook/pb_popover/docs/_popover_scroll_height.jsx
playbook_ui_docs-14.8.0.pre.alpha.PLAY1615movenegativetoleftofcurrencysign4543 app/pb_kits/playbook/pb_popover/docs/_popover_scroll_height.jsx
playbook_ui-14.8.0.pre.alpha.PLAY1615movenegativetoleftofcurrencysign4543 app/pb_kits/playbook/pb_popover/docs/_popover_scroll_height.jsx
playbook_ui_docs-14.8.0.pre.alpha.PLAY1615movenegativetoleftofcurrencysign4539 app/pb_kits/playbook/pb_popover/docs/_popover_scroll_height.jsx
playbook_ui-14.8.0.pre.alpha.PLAY1615movenegativetoleftofcurrencysign4539 app/pb_kits/playbook/pb_popover/docs/_popover_scroll_height.jsx
playbook_ui_docs-14.9.0.pre.rc.0 app/pb_kits/playbook/pb_popover/docs/_popover_scroll_height.jsx
playbook_ui-14.9.0.pre.rc.0 app/pb_kits/playbook/pb_popover/docs/_popover_scroll_height.jsx
playbook_ui_docs-14.7.0.pre.alpha.dependabotnpmandyarnfloatinguireact026284532 app/pb_kits/playbook/pb_popover/docs/_popover_scroll_height.jsx
playbook_ui-14.7.0.pre.alpha.dependabotnpmandyarnfloatinguireact026284532 app/pb_kits/playbook/pb_popover/docs/_popover_scroll_height.jsx
playbook_ui-14.8.0 app/pb_kits/playbook/pb_popover/docs/_popover_scroll_height.jsx
playbook_ui_docs-14.7.0.pre.alpha.revert3916revert3893PBNTR667railstypeaheadformintegration4523 app/pb_kits/playbook/pb_popover/docs/_popover_scroll_height.jsx
playbook_ui-14.7.0.pre.alpha.revert3916revert3893PBNTR667railstypeaheadformintegration4523 app/pb_kits/playbook/pb_popover/docs/_popover_scroll_height.jsx
playbook_ui_docs-14.8.0.pre.rc.8 app/pb_kits/playbook/pb_popover/docs/_popover_scroll_height.jsx
playbook_ui-14.8.0.pre.rc.8 app/pb_kits/playbook/pb_popover/docs/_popover_scroll_height.jsx
playbook_ui_docs-14.8.0.pre.rc.7 app/pb_kits/playbook/pb_popover/docs/_popover_scroll_height.jsx
playbook_ui-14.8.0.pre.rc.7 app/pb_kits/playbook/pb_popover/docs/_popover_scroll_height.jsx
playbook_ui_docs-14.8.0.pre.rc.6 app/pb_kits/playbook/pb_popover/docs/_popover_scroll_height.jsx
playbook_ui-14.8.0.pre.rc.6 app/pb_kits/playbook/pb_popover/docs/_popover_scroll_height.jsx
playbook_ui_docs-14.8.0.pre.rc.5 app/pb_kits/playbook/pb_popover/docs/_popover_scroll_height.jsx
playbook_ui-14.8.0.pre.rc.5 app/pb_kits/playbook/pb_popover/docs/_popover_scroll_height.jsx