Sha256: 9a4ce8d1c62805798da1d57e37e43df2e1e6f97c317251671bbba3dc8abbe200

Contents?: true

Size: 1.4 KB

Versions: 136

Compression:

Stored size: 1.4 KB

Contents

import React, { useState } from 'react'
import {
  Body,
  Button,
  PbReactPopover,
  Title,
} from '../..'

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
        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

136 entries across 136 versions & 1 rubygems

Version Path
playbook_ui-9.3.0.alpha.inline3 app/pb_kits/playbook/pb_popover/docs/_popover_scroll_height.jsx
playbook_ui-9.3.0.pre.alpha.password.strength.2 app/pb_kits/playbook/pb_popover/docs/_popover_scroll_height.jsx
playbook_ui-9.3.0.alpha.inline2 app/pb_kits/playbook/pb_popover/docs/_popover_scroll_height.jsx
playbook_ui-9.3.0.alpha.inline1 app/pb_kits/playbook/pb_popover/docs/_popover_scroll_height.jsx
playbook_ui-9.3.0.pre.alpha.password.strength.1 app/pb_kits/playbook/pb_popover/docs/_popover_scroll_height.jsx
playbook_ui-9.3.0 app/pb_kits/playbook/pb_popover/docs/_popover_scroll_height.jsx
playbook_ui-9.2.2.pre.alpha.margin app/pb_kits/playbook/pb_popover/docs/_popover_scroll_height.jsx
playbook_ui-9.2.2 app/pb_kits/playbook/pb_popover/docs/_popover_scroll_height.jsx
playbook_ui-9.2.1 app/pb_kits/playbook/pb_popover/docs/_popover_scroll_height.jsx
playbook_ui-9.2.0 app/pb_kits/playbook/pb_popover/docs/_popover_scroll_height.jsx
playbook_ui-9.1.0 app/pb_kits/playbook/pb_popover/docs/_popover_scroll_height.jsx
playbook_ui-9.0.0 app/pb_kits/playbook/pb_popover/docs/_popover_scroll_height.jsx
playbook_ui-8.3.0.alpha.select.pre.margin app/pb_kits/playbook/pb_popover/docs/_popover_scroll_height.jsx
playbook_ui-8.3.0 app/pb_kits/playbook/pb_popover/docs/_popover_scroll_height.jsx
playbook_ui-8.2.1.pre.alpha5 app/pb_kits/playbook/pb_popover/docs/_popover_scroll_height.jsx
playbook_ui-8.2.1.pre.alpha4 app/pb_kits/playbook/pb_popover/docs/_popover_scroll_height.jsx
playbook_ui-8.2.1.alpha.iconacc app/pb_kits/playbook/pb_popover/docs/_popover_scroll_height.jsx
playbook_ui-8.2.1.pre.alpha3 app/pb_kits/playbook/pb_popover/docs/_popover_scroll_height.jsx
playbook_ui-8.2.1.pre.alpha2 app/pb_kits/playbook/pb_popover/docs/_popover_scroll_height.jsx
playbook_ui-8.3.0.deps2 app/pb_kits/playbook/pb_popover/docs/_popover_scroll_height.jsx