Repository navigation
v6.0.1
Patch Changes
-
d691bf0: Deprecate
Button'stypeprop in favour ofvariant(ui-kit#278 follow-up).The two props address the same axis and largely duplicate each other: 3 of the 5
typevalues (dashed,text,link) are spelled identically to their
variantcounterparts, so<Button type="text">and<Button variant="text">
already render the same thing.typeonly contributes the aliases
primary→solidanddefault→outlined, whilevariantadditionally
offersfilled, whichtypecannot express.typeis now marked@deprecatedwith an in-editor migration table. Nothing
changes at runtime — passing both still letsvariantwin, and every
type/variantcombination resolves to exactly the same variant as before.
The default moved off the deprecated prop (type = 'default'on the parameter)
onto the resolution itself (?? 'outlined'), so a Button with neither prop no
longer routes through the deprecated path.typeuse instead primarysoliddefaultoutlined(now the default, so it can be omitted)dasheddashedtexttextlinklinktypewill be removed in the next major. -
7d73934: Stop
Buttonfrom emitting hardcodeddata-variant="default"/data-size="default"
(ui-kit#308).The two attributes were literals that never reflected the component's actual props:
a Button rendered withvariant="outlined" size="large"still emitted
data-variant="default" data-size="default". They were a leftover from the Phase 4
absorb (ui-kit#304), which inlinedcore/button.tsx'sdata-variant={variant}/
data-size={size}while the atom happened to be passing the literal"default".No consumer-visible behaviour change: because the values were constant, any selector
using them matched exactly the same elements as[data-slot='button'], which is
unchanged and remains the documented styling hook.data-slot="button"itself is
untouched — the 20[data-slot='button'][data-color=…]rules inglobals.cssthat
define the preset-color system depend on it.This also clears a false positive in the smell check documented in
CLAUDE.md, which
matcheddata-variant="on the very component it exists to police.
What's Changed
- 🐛 fix(ui): drop Button's hardcoded data-variant/data-size by @pjb0811 in #309
- ♻️ refactor(ui): deprecate Button's type prop in favour of variant by @pjb0811 in #311
- 🔖 chore: version packages by @github-actions[bot] in #310
Full Changelog: v6.0.0...v6.0.1