Skip to content

Don't need footer with cancel button in read-only side modal forms #2619

Closed

Description

@david-crespo

The X in the corner should be sufficient — there's no operation to "cancel". So it might be cool to add a flag to the form that lets us suppress the footer altogether. onSubmit is already optional, so maybe we just use that to hide the entire footer.

<SideModal.Footer error={!!submitError}>
<Button variant="ghost" size="sm" onClick={onDismiss}>
Cancel
</Button>
{onSubmit && (
<Button
type="submit"
size="sm"
disabled={!!submitDisabled}
disabledReason={submitDisabled}
loading={loading || isSubmitting}
form={id}
>
{label}
</Button>
)}
</SideModal.Footer>

Image

Activity

  1. self-assigned this
    on Dec 12, 2024
  2. added this to the 13 milestone on Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions