Skip to content

Got undefined error from Dialog #268

@ChristoRibeiro

Description

@ChristoRibeiro

Hi @RobinMalfait,

I'm using headlessui/react@dev and I'm going through an error with the Dialog component:

TypeError: Cannot read property 'Overlay' of undefined

Here the code, copy/pasted from the documentation:

<Dialog open={showForm} onClose={setShowForm}>
  <Dialog.Overlay />

  <Dialog.Title>Deactivate account</Dialog.Title>
  <Dialog.Description>This will permanently deactivate your account</Dialog.Description>

  <p>
      Are you sure you want to deactivate your account? All of your data will be permanently
      removed. This action cannot be undone.
  </p>

  <button onClick={() => setShowForm(false)}>Deactivate</button>
  <button onClick={() => setShowForm(false)}>Cancel</button>
</Dialog>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions