Skip to content

Commit

Permalink
feat: add ID Attribute to Toggle Root Component (#823)
Browse files Browse the repository at this point in the history
Co-authored-by: Hunter Johnston <64506580+huntabyte@users.noreply.github.com>
  • Loading branch information
max-got and huntabyte authored Oct 28, 2024
1 parent 48486c9 commit 932ba90
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/calm-snails-refuse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"bits-ui": patch
---

Add ID Attribute to Toggle Root Component
1 change: 1 addition & 0 deletions packages/bits-ui/src/lib/bits/toggle/toggle.svelte.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class ToggleRootState {
() =>
({
[ROOT_ATTR]: "",
id: this.#id.current,
"data-disabled": getDataDisabled(this.#disabled.current),
"aria-pressed": getAriaPressed(this.pressed.current),
"data-state": getToggleDataState(this.pressed.current),
Expand Down

0 comments on commit 932ba90

Please sign in to comment.