Sha256: 0541b6dd6f2a744f5e5d2c2d31578faeabf0d38744f513c3ef11101bf4a80c58

Contents?: true

Size: 847 Bytes

Versions: 108

Compression:

Stored size: 847 Bytes

Contents

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

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

  return (
    <>
      <Button onClick={open}>{'Open Dialog'}</Button>
      <Dialog
          cancelButton="Cancel Button"
          className="wrapper"
          confirmButton="Okay"
          loading={isLoading}
          onCancel={close}
          onClose={close}
          onConfirm={() => setIsLoading(!isLoading)}
          opened={isOpen}
          portalClassName="portal"
          size="sm"
          text="Hello Body Text, Nice to meet ya."
          title="Header Title is the Title Prop"
      />
    </>
  )
}

export default DialogDefault

Version data entries

108 entries across 108 versions & 2 rubygems

Version Path
playbook_ui_docs-14.1.0.pre.alpha.PBNTR455ganttchartPOC3569 app/pb_kits/playbook/pb_dialog/docs/_dialog_default.jsx
playbook_ui-14.1.0.pre.alpha.PBNTR455ganttchartPOC3569 app/pb_kits/playbook/pb_dialog/docs/_dialog_default.jsx
playbook_ui_docs-14.1.0.pre.alpha.fixaction3547 app/pb_kits/playbook/pb_dialog/docs/_dialog_default.jsx
playbook_ui-14.1.0.pre.alpha.fixaction3547 app/pb_kits/playbook/pb_dialog/docs/_dialog_default.jsx
playbook_ui_docs-14.1.0.pre.alpha.PA1477timestampkit3536 app/pb_kits/playbook/pb_dialog/docs/_dialog_default.jsx
playbook_ui-14.1.0.pre.alpha.PA1477timestampkit3536 app/pb_kits/playbook/pb_dialog/docs/_dialog_default.jsx
playbook_ui_docs-14.0.0.pre.alpha.testthemeexport3533 app/pb_kits/playbook/pb_dialog/docs/_dialog_default.jsx
playbook_ui-14.0.0.pre.alpha.testthemeexport3533 app/pb_kits/playbook/pb_dialog/docs/_dialog_default.jsx
playbook_ui_docs-14.0.0.pre.alpha.updateviewcomponentgem3527 app/pb_kits/playbook/pb_dialog/docs/_dialog_default.jsx
playbook_ui-14.0.0.pre.alpha.updateviewcomponentgem3527 app/pb_kits/playbook/pb_dialog/docs/_dialog_default.jsx
playbook_ui_docs-14.0.0.pre.alpha.PLAY15063526 app/pb_kits/playbook/pb_dialog/docs/_dialog_default.jsx
playbook_ui-14.0.0.pre.alpha.PLAY15063526 app/pb_kits/playbook/pb_dialog/docs/_dialog_default.jsx
playbook_ui_docs-14.0.0.pre.alpha.PLAY15063525 app/pb_kits/playbook/pb_dialog/docs/_dialog_default.jsx
playbook_ui-14.0.0.pre.alpha.PLAY15063525 app/pb_kits/playbook/pb_dialog/docs/_dialog_default.jsx
playbook_ui_docs-14.0.0.pre.alpha.PLAY15063524 app/pb_kits/playbook/pb_dialog/docs/_dialog_default.jsx
playbook_ui-14.0.0.pre.alpha.PLAY15063524 app/pb_kits/playbook/pb_dialog/docs/_dialog_default.jsx
playbook_ui_docs-14.0.0.pre.alpha.PLAY15063523 app/pb_kits/playbook/pb_dialog/docs/_dialog_default.jsx
playbook_ui-14.0.0.pre.alpha.PLAY15063523 app/pb_kits/playbook/pb_dialog/docs/_dialog_default.jsx
playbook_ui_docs-14.0.0.pre.alpha.PLAY15063522 app/pb_kits/playbook/pb_dialog/docs/_dialog_default.jsx
playbook_ui-14.0.0.pre.alpha.PLAY15063522 app/pb_kits/playbook/pb_dialog/docs/_dialog_default.jsx