Sha256: 369c64128f1b3089e54971b6b1f7043413e379208938d95e3d0ea3dbaff7c2ce

Contents?: true

Size: 703 Bytes

Versions: 7

Compression:

Stored size: 703 Bytes

Contents

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

export default class PopoverWithButton 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
          offset
          placement="bottom"
          reference={popoverReference}
          show={this.state.showPopover}
      >
        {'Whoa. I\'m a popover.'}
      </PbReactPopover>
    )
  }
}

Version data entries

7 entries across 7 versions & 1 rubygems

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