Add migration notes

Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
This commit is contained in:
Charles de Dreuille
2026-03-12 16:27:40 +00:00
parent 9d5f3baf1e
commit 27c2c24a1a
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -4,4 +4,7 @@
Removed redundant `selected` and `indeterminate` props from the `Checkbox` component. Use the `isSelected` and `isIndeterminate` props instead, which are the standard React Aria props and already handle both the checkbox behaviour and the corresponding CSS data attributes.
**Migration:**
Replace any usage of the `selected` and `indeterminate` props on `Checkbox` with the `isSelected` and `isIndeterminate` props. Note that the checked state and related CSS data attributes (such as `data-selected` and `data-indeterminate`) are now driven by React Aria, so any custom logic that previously inspected or set these via the old props should instead rely on the React Aria-managed state and attributes exposed through the new props.
**Affected components:** Checkbox
@@ -46,7 +46,7 @@ export const Checkbox = forwardRef<HTMLLabelElement, CheckboxProps>(
<RiCheckLine size={12} />
)}
</div>
<span>{children}</span>
<div>{children}</div>
</>
)}
</RACheckbox>