Skip to content

fix(elements): merge consumer className in ConfirmationAction - #460

Open
ephraimduncan wants to merge 1 commit into
vercel:mainfrom
ephraimduncan:fix/confirmation-action-classname
Open

fix(elements): merge consumer className in ConfirmationAction#460
ephraimduncan wants to merge 1 commit into
vercel:mainfrom
ephraimduncan:fix/confirmation-action-classname

Conversation

@ephraimduncan

Copy link
Copy Markdown

Problem

ConfirmationAction spread {...props} after its literal className, so any consumer className (e.g. className="text-destructive") replaced the built-in h-8 px-3 text-sm entirely. The button then fell back to the Button primitive's default h-9 px-4 py-2, silently changing dimensions when only a color/margin was requested.

Fix

Destructure className and compose via cn("h-8 px-3 text-sm", className), matching the pattern used by ConfirmationActions and the rest of the package. tailwind-merge still lets consumers deliberately override h-8/px-3.

Verification

  • New regression test covers both additive-className (compact classes + consumer class coexist) and no-className cases.
  • pnpm vitest run __tests__/confirmation.test.tsx — 18/18 pass.
  • ultracite check clean on both files.

@vercel

vercel Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

@ephraimduncan is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant