Skip to content

Commit

Permalink
fix: clipboard trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
segunadebayo committed Nov 4, 2024
1 parent d616d42 commit cbf5cfa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/sweet-cycles-thank.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@zag-js/clipboard": patch
---

Fix issue where clipboard trigger doesn't have `type=button`
1 change: 1 addition & 0 deletions packages/machines/clipboard/src/clipboard.connect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export function connect<T extends PropTypes>(state: State, send: Send, normalize
getTriggerProps() {
return normalize.button({
...parts.trigger.attrs,
type: "button",
"aria-label": copied ? "Copied to clipboard" : "Copy to clipboard",
"data-copied": dataAttr(copied),
onClick() {
Expand Down

0 comments on commit cbf5cfa

Please sign in to comment.