Sha256: 18625fbf4e874c78b3b0cd6cd2f59d3790320ee92d224a6abb2ea5c360dc0686

Contents?: true

Size: 709 Bytes

Versions: 9

Compression:

Stored size: 709 Bytes

Contents

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

export default class PopoverPortal extends React.Component {
  state = {
    showPopover: false,
  }

  handleTogglePopover = () => {
    this.setState({ showPopover: !this.state.showPopover })
  }

  render() {
    const popoverReference = (
      <Button
          onClick={this.handleTogglePopover}
          text="Button Secondary"
          variant="secondary"
      />
    )

    return (
      <PbReactPopover
          placement="bottom"
          reference={popoverReference}
          show={this.state.showPopover}
          usePortal
      >
        {'Whoa. I\'m a portal popover.'}
      </PbReactPopover>
    )
  }
}

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
playbook_ui-4.6.1 app/pb_kits/playbook/pb_popover/docs/_popover_portal.jsx
playbook_ui-4.6.0 app/pb_kits/playbook/pb_popover/docs/_popover_portal.jsx
playbook_ui-4.5.2 app/pb_kits/playbook/pb_popover/docs/_popover_portal.jsx
playbook_ui-4.5.1 app/pb_kits/playbook/pb_popover/docs/_popover_portal.jsx
playbook_ui-4.5.0 app/pb_kits/playbook/pb_popover/docs/_popover_portal.jsx
playbook_ui-4.4.1 app/pb_kits/playbook/pb_popover/docs/_popover_portal.jsx
playbook_ui-4.4.0 app/pb_kits/playbook/pb_popover/docs/_popover_portal.jsx
playbook_ui-4.3.1 app/pb_kits/playbook/pb_popover/docs/_popover_portal.jsx
playbook_ui-4.3.0 app/pb_kits/playbook/pb_popover/docs/_popover_portal.jsx