Skip to content

Commit 292af8d

Browse files
feat: add command and commandfor to HTMLButtonAttributes (#16117)
* feat: add `command` and `commandfor` to `HTMLButtonAttributes` * Update .changeset/empty-cherries-act.md --------- Co-authored-by: Rich Harris <[email protected]>
1 parent 90807ca commit 292af8d

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

.changeset/empty-cherries-act.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'svelte': patch
3+
---
4+
5+
fix: add `command` and `commandfor` to `HTMLButtonAttributes`

packages/svelte/elements.d.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -926,6 +926,17 @@ export interface HTMLButtonAttributes extends HTMLAttributes<HTMLButtonElement>
926926
value?: string | string[] | number | undefined | null;
927927
popovertarget?: string | undefined | null;
928928
popovertargetaction?: 'toggle' | 'show' | 'hide' | undefined | null;
929+
command?:
930+
| 'show-modal'
931+
| 'close'
932+
| 'request-close'
933+
| 'show-popover'
934+
| 'hide-popover'
935+
| 'toggle-popover'
936+
| (string & {})
937+
| undefined
938+
| null;
939+
commandfor?: string | undefined | null;
929940
}
930941

931942
export interface HTMLCanvasAttributes extends HTMLAttributes<HTMLCanvasElement> {

0 commit comments

Comments
 (0)