Skip to content

Commit

Permalink
Add support for Switch component descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
jviide committed Mar 4, 2025
1 parent b91823c commit b3e27af
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/metal-drinks-marry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@badrap/libapp": patch
---

Add support for Switch component descriptions
5 changes: 4 additions & 1 deletion src/ui/experimental/Switch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@ type SwitchProps = {
name?: string;
/**
* The text label associated with the switch.
* Improves usability and accessibility by providing context for the switch.
*/
label?: string;
/**
* The text description associated with the switch.
*/
description?: string;
/**
* If defined (i.e. not `undefined`), toggling the switch submits the `action`
* value with client input state to the UI endpoint.
Expand Down

0 comments on commit b3e27af

Please sign in to comment.