Skip to content

[docs] Dialog docs examples use buttons that should be Dialog.Close #40

@CiscoFran10

Description

@CiscoFran10

Describe the issue

Some Dialog documentation examples show action buttons Cancel that are intended to close the dialog, but they are rendered as plain Button components instead of being wrapped with Dialog.Close.

This can lead consumers to copy incorrect patterns where dialog-closing actions are not using the proper API.

trimmed-1770490550787-20db3ebb-7d8d-462e-9442-65742174b40b.webm

Current behavior

Example from the docs:

<div className="mt-8 flex justify-end gap-2">
  <Button variant="secondary">Cancel</Button>
  <Dialog.Close
    render={(props) => (
      <Button variant="destructive" {...props}>
        Delete
      </Button>
    )}
  />
</div>

Here, Cancel visually behaves like a close action but is not implemented using Dialog.Close.


Expected behavior

All actions intended to close the dialog (Cancel, Close, Delete, etc.) should consistently use Dialog.Close in documentation examples.


Environment

  • Package: @cloudflare/kumo
  • Version: 1.0.0
  • Browser: All
  • OS: All

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