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_docs-14.11.1.pre.alpha.play1724darkmodeauditmap5437 app/pb_kits/playbook/pb_dialog/docs/_dialog_should_close_on_overlay.jsx
playbook_ui-14.11.1.pre.alpha.play1724darkmodeauditmap5437 app/pb_kits/playbook/pb_dialog/docs/_dialog_should_close_on_overlay.jsx
playbook_ui_docs-14.11.1.pre.alpha.PBNTR719listdraggablesimple5432 app/pb_kits/playbook/pb_dialog/docs/_dialog_should_close_on_overlay.jsx
playbook_ui-14.11.1.pre.alpha.PBNTR719listdraggablesimple5432 app/pb_kits/playbook/pb_dialog/docs/_dialog_should_close_on_overlay.jsx
playbook_ui_docs-14.11.1.pre.alpha.PBNTR768stickyrightcolumn5431 app/pb_kits/playbook/pb_dialog/docs/_dialog_should_close_on_overlay.jsx
playbook_ui-14.11.1.pre.alpha.PBNTR768stickyrightcolumn5431 app/pb_kits/playbook/pb_dialog/docs/_dialog_should_close_on_overlay.jsx
playbook_ui_docs-14.12.0.pre.rc.6 app/pb_kits/playbook/pb_dialog/docs/_dialog_should_close_on_overlay.jsx
playbook_ui-14.12.0.pre.rc.6 app/pb_kits/playbook/pb_dialog/docs/_dialog_should_close_on_overlay.jsx
playbook_ui_docs-14.11.1.pre.alpha.PBNTR718simiplifieddraggablereact5415 app/pb_kits/playbook/pb_dialog/docs/_dialog_should_close_on_overlay.jsx
playbook_ui-14.11.1.pre.alpha.PBNTR718simiplifieddraggablereact5415 app/pb_kits/playbook/pb_dialog/docs/_dialog_should_close_on_overlay.jsx
playbook_ui_docs-14.11.1.pre.alpha.play1724darkmodeauditmap5413 app/pb_kits/playbook/pb_dialog/docs/_dialog_should_close_on_overlay.jsx
playbook_ui-14.11.1.pre.alpha.play1724darkmodeauditmap5413 app/pb_kits/playbook/pb_dialog/docs/_dialog_should_close_on_overlay.jsx
playbook_ui_docs-14.12.0.pre.rc.5 app/pb_kits/playbook/pb_dialog/docs/_dialog_should_close_on_overlay.jsx
playbook_ui-14.12.0.pre.rc.5 app/pb_kits/playbook/pb_dialog/docs/_dialog_should_close_on_overlay.jsx
playbook_ui_docs-14.11.1.pre.alpha.play1724darkmodeauditmap5409 app/pb_kits/playbook/pb_dialog/docs/_dialog_should_close_on_overlay.jsx
playbook_ui-14.11.1.pre.alpha.play1724darkmodeauditmap5409 app/pb_kits/playbook/pb_dialog/docs/_dialog_should_close_on_overlay.jsx
playbook_ui_docs-14.11.1.pre.alpha.PBNTR718simiplifieddraggablereact5400 app/pb_kits/playbook/pb_dialog/docs/_dialog_should_close_on_overlay.jsx
playbook_ui-14.11.1.pre.alpha.PBNTR718simiplifieddraggablereact5400 app/pb_kits/playbook/pb_dialog/docs/_dialog_should_close_on_overlay.jsx
playbook_ui_docs-14.11.1.pre.alpha.PBNTR718simiplifieddraggablereact5392 app/pb_kits/playbook/pb_dialog/docs/_dialog_should_close_on_overlay.jsx
playbook_ui-14.11.1.pre.alpha.PBNTR718simiplifieddraggablereact5392 app/pb_kits/playbook/pb_dialog/docs/_dialog_should_close_on_overlay.jsx