Skip to content

An open source design system that's fully customizable and agent ready

TypeScript

fix(CheckboxInput): add size, checked, disabled state to checkbox xdsClassName (#2532)

Cindy Zhang8366678f2458
diff --git a/packages/core/src/CheckboxInput/XDSCheckboxInput.tsx b/packages/core/src/CheckboxInput/XDSCheckboxInput.tsx
index c0a578f126..5a14fba1ff 100644
--- a/packages/core/src/CheckboxInput/XDSCheckboxInput.tsx
+++ b/packages/core/src/CheckboxInput/XDSCheckboxInput.tsx
@@ -430,7 +430,15 @@ export function XDSCheckboxInput({
<div
aria-hidden="true"
{...mergeProps(
- xdsClassName('checkbox'),
+ xdsClassName('checkbox', {
+ size,
+ checked: isChecked
+ ? 'checked'
+ : isIndeterminate
+ ? 'indeterminate'
+ : null,
+ disabled: isDisabled ? 'disabled' : null,
+ }),
stylex.props(
styles.checkbox,
checkboxSizeStyles[size],