Repository navigation
v6.1.0
Minor Changes
-
87327a8:
Button'stypeprop is now proper syntactic sugar for a(color, variant)
pair, matching antd's spec — and is no longer deprecated.Previously
typeonly mapped to avariantand leftcoloruntouched, so
type="primary"rendered a grey solid button instead of a primary-coloured
one, andtype="link"rendered a link-styled button in the default colour.
Measured against antd's documented behaviour (<Button type="primary">≡
<Button color="primary" variant="solid">), that mapping was incomplete.typenow equivalent to previously primarycolor="primary" variant="solid"variant="solid"defaultcolor="default" variant="outlined"variant="outlined"dashedcolor="default" variant="dashed"variant="dashed"textcolor="default" variant="text"variant="text"linkcolor="primary" variant="link"variant="link"Visible change:
type="primary"andtype="link"now pick up the primary
colour. The other three values are unchanged. Explicitcolorandvariant
still win over whatevertypemaps to, sotype="primary" variant="filled"
keeps the primary colour but renders filled, anddangerstill overrides the
resolved colour.The
@deprecatedmarker added in the previous release is withdrawn:typeand
variantare not duplicates on one axis —typesets two axes at once, which
is exactly why its value names overlap withvariant's.
Patch Changes
-
916eef3:
Radio.Group's first option no longer looks misaligned in horizontal
orientation on hosts that style prose lists.The
<ul>these groups render already resetmargin/padding/list-style
(#253), but their<li>children did not. Without preflight, a host's own
list rules still reach the items — Docusaurus/Infima ships
.markdown li + li { margin-top: 0.25rem }, which gives every option but the
first a top margin. In a horizontal (flex-row) group that pushes options 2..n
down 4px and stretches the first item's flex line, so the first radio sits
higher than the rest; withoptionType="button"the first segment ends up 4px
taller than its neighbours. Measured on this repo's own docs site: item 1 at
y=288.3, h=23.3vs items 2/3 aty=292.3, h=19.3.The list items in
Radio.Group,Checkbox.Group,MenuandUploadnow
carry thatm-0reset themselves.classNames.wrapper/classNames.item
still win, so per-item margins remain overridable.Checkbox.Groupalso spaces its options withflex+gapin both
orientations instead ofspace-y-2when vertical.space-yworks by putting
margins on the children, which is exactly what the new reset clears — the
rendered spacing (8px) is unchanged.
What's Changed
- ✨ feat(ui): make Button's type sugar for a (color, variant) pair by @pjb0811 in #312
- 🐛 fix(ui): reset list-item margins so horizontal Radio.Group's first option stays aligned by @pjb0811 in #316
- 🔖 chore: version packages by @github-actions[bot] in #313
Full Changelog: v6.0.1...v6.1.0