feat(ui): add isPending prop and deprecate loading
Add `isPending` prop to Alert, Button, ButtonIcon, Table, and TableRoot, aligning with React Aria naming conventions. The `loading` prop is deprecated but remains functional as an alias. CSS selectors now target `data-ispending` instead of `data-loading` for pending state styling. The `data-loading` attribute is still emitted for backward compatibility. Internal Table hooks (`PaginationResult`, `UsePageCacheResult`) renamed `loading` to `isPending`. The `useTable` hook returns both `isPending` and `loading` on `tableProps` to preserve backward compatibility. Updated docs-ui documentation and stories accordingly. Signed-off-by: Johan Persson <johanopersson@gmail.com>
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
---
|
||||
'@backstage/ui': patch
|
||||
---
|
||||
|
||||
Added `isPending` prop to Alert, Button, ButtonIcon, Table, and TableRoot as a replacement for the `loading` prop, aligning with React Aria naming conventions. The `loading` prop is now deprecated but still supported as an alias. CSS selectors now use `data-ispending` instead of `data-loading` for styling pending states; `data-loading` is still emitted for backward compatibility but will be removed alongside the `loading` prop.
|
||||
|
||||
**Affected components:** Alert, Button, ButtonIcon, Table, TableRoot
|
||||
Reference in New Issue
Block a user