design-angular-kit icon indicating copy to clipboard operation
design-angular-kit copied to clipboard

fix(dropdown): support outlined button variants and fix icon color

Open giulio-leone opened this issue 8 months ago • 2 comments

What

Fixes #573 — Outlined dropdown variants (btn-outline-*) now work correctly.

Why

The ButtonColor type already supported outlined variants ('outline-primary', etc.), and the buttonClass getter correctly produces btn-outline-primary. However, the expand icon color was hardcoded to 'light' whenever any color was set — making the icon invisible on outlined buttons (which have transparent backgrounds).

How

  • Added isOutlineVariant getter to detect outline-* color values
  • Added expandIconColor getter: solid → 'light', outline → 'primary', none → 'primary'
  • Template now uses [color]="expandIconColor" instead of the ternary

Usage

<it-dropdown color="outline-primary">
  <span button>Azione</span>
  <li itDropdownItem list>Opzione 1</li>
</it-dropdown>

Tests

  • 117/117 tests pass (0 lint errors)
  • 8 new regression tests cover: all ButtonColor variants, icon color logic, outline detection

Migration

None — the feature was already supported at the type level but non-functional visually.

⚠️ This reopens #627 which was accidentally closed due to fork deletion.

giulio-leone avatar Mar 25 '26 19:03 giulio-leone

@giulio-leone is attempting to deploy a commit to the dip-trasformazione-digitale Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Mar 25 '26 19:03 vercel[bot]

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
design-angular-kit Error Error Apr 10, 2026 0:24am

Request Review

vercel[bot] avatar Mar 27 '26 15:03 vercel[bot]