Sha256: e224189069eaf6db271c95148ae91db80b1a2e248ccb7b781ae9bb735e82fe6d

Contents?: true

Size: 733 Bytes

Versions: 948

Compression:

Stored size: 733 Bytes

Contents

import React, { useState } from 'react'
import { Button, Dialog } from 'playbook-ui'

const DialogShouldCloseOnOverlay = () => {
  const [isOpen, setIsOpen] = useState(false)
  const close = () => setIsOpen(false)
  const open = () => setIsOpen(true)

  return (
    <>
      <Button onClick={open}>{'Open Dialog'}</Button>
      <Dialog
          cancelButton="Cancel"
          confirmButton="Okay"
          onCancel={close}
          onClose={close}
          onConfirm={close}
          opened={isOpen}
          shouldCloseOnOverlayClick={false}
          size="sm"
          text="Click on the overlay all day. I will stay open."
          title="Neat Header"
      />
    </>
  )
}

export default DialogShouldCloseOnOverlay

Version data entries

948 entries across 948 versions & 2 rubygems

Version Path
playbook_ui-14.11.0.pre.rc.17 app/pb_kits/playbook/pb_dialog/docs/_dialog_should_close_on_overlay.jsx
playbook_ui-14.11.0 app/pb_kits/playbook/pb_dialog/docs/_dialog_should_close_on_overlay.jsx
playbook_ui_docs-14.11.0.pre.rc.16 app/pb_kits/playbook/pb_dialog/docs/_dialog_should_close_on_overlay.jsx
playbook_ui-14.11.0.pre.rc.16 app/pb_kits/playbook/pb_dialog/docs/_dialog_should_close_on_overlay.jsx
playbook_ui_docs-14.10.0.pre.alpha.play16825301 app/pb_kits/playbook/pb_dialog/docs/_dialog_should_close_on_overlay.jsx
playbook_ui-14.10.0.pre.alpha.play16825301 app/pb_kits/playbook/pb_dialog/docs/_dialog_should_close_on_overlay.jsx
playbook_ui_docs-14.11.0.pre.rc.15 app/pb_kits/playbook/pb_dialog/docs/_dialog_should_close_on_overlay.jsx
playbook_ui-14.11.0.pre.rc.15 app/pb_kits/playbook/pb_dialog/docs/_dialog_should_close_on_overlay.jsx
playbook_ui_docs-14.11.0.pre.rc.14 app/pb_kits/playbook/pb_dialog/docs/_dialog_should_close_on_overlay.jsx
playbook_ui-14.11.0.pre.rc.14 app/pb_kits/playbook/pb_dialog/docs/_dialog_should_close_on_overlay.jsx
playbook_ui_docs-14.11.0.pre.rc.13 app/pb_kits/playbook/pb_dialog/docs/_dialog_should_close_on_overlay.jsx
playbook_ui-14.11.0.pre.rc.13 app/pb_kits/playbook/pb_dialog/docs/_dialog_should_close_on_overlay.jsx
playbook_ui_docs-14.11.0.pre.rc.12 app/pb_kits/playbook/pb_dialog/docs/_dialog_should_close_on_overlay.jsx
playbook_ui-14.11.0.pre.rc.12 app/pb_kits/playbook/pb_dialog/docs/_dialog_should_close_on_overlay.jsx
playbook_ui_docs-14.10.0.pre.alpha.PLAY1774timelinelabelstepspacing5274 app/pb_kits/playbook/pb_dialog/docs/_dialog_should_close_on_overlay.jsx
playbook_ui-14.10.0.pre.alpha.PLAY1774timelinelabelstepspacing5274 app/pb_kits/playbook/pb_dialog/docs/_dialog_should_close_on_overlay.jsx
playbook_ui_docs-14.10.0.pre.alpha.play1465attempt25272 app/pb_kits/playbook/pb_dialog/docs/_dialog_should_close_on_overlay.jsx
playbook_ui-14.10.0.pre.alpha.play1465attempt25272 app/pb_kits/playbook/pb_dialog/docs/_dialog_should_close_on_overlay.jsx
playbook_ui_docs-14.10.0.pre.alpha.play16825244 app/pb_kits/playbook/pb_dialog/docs/_dialog_should_close_on_overlay.jsx
playbook_ui-14.10.0.pre.alpha.play16825244 app/pb_kits/playbook/pb_dialog/docs/_dialog_should_close_on_overlay.jsx