RadioGroup & Checkbox label prop (DES-68)
Pre-release · Type: ✨ Feature
Problem
The clickable area of RadioGroupItem and Checkbox was only the icon itself (14×14px); the text-label area could not trigger selection, which did not meet the design spec.
Changed Files
packages/design/src/components/RadioGroup/RadioGroup.tsxpackages/design/src/components/RadioGroup/styles.tspackages/design/src/components/Checkbox/Checkbox.tsxpackages/design/src/components/Checkbox/styles.ts
Changes
RadioGroupItem and Checkbox gain label / labelClassName props. When label is passed, the icon and text are wrapped in a <label> element so the entire row is clickable. The disabled state is passed to the container via data-disabled, preserving the cursor-not-allowed style.
Usage example
<RadioGroup defaultValue="apple">
<RadioGroupItem value="apple" label="Apple" />
<RadioGroupItem value="banana" label="Banana" />
</RadioGroup>
<Checkbox label="同意条款" />