Skip to content

Commit

Permalink
feat(jsx): add popover api attributes (#3323)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssssota authored Aug 28, 2024
1 parent 12893e2 commit bc2b7cf
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/jsx/intrinsic-elements.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,8 @@ export namespace JSX {
lang?: string | undefined
nonce?: string | undefined
placeholder?: string | undefined
popover?: string | undefined
/** @see https://developer.mozilla.org/en-US/docs/Web/API/Popover_API */
popover?: boolean | 'auto' | 'manual' | undefined
slot?: string | undefined
spellcheck?: boolean | undefined
style?: CSSProperties | string | undefined
Expand Down Expand Up @@ -238,6 +239,9 @@ export namespace JSX {
cite?: string | undefined
}

/** @see https://developer.mozilla.org/en-US/docs/Web/API/Popover_API */
type HTMLAttributePopoverTargetAction = 'show' | 'hide' | 'toggle'

interface ButtonHTMLAttributes extends HTMLAttributes {
disabled?: boolean | undefined
form?: string | undefined
Expand All @@ -248,6 +252,8 @@ export namespace JSX {
name?: string | undefined
type?: 'submit' | 'reset' | 'button' | undefined
value?: string | ReadonlyArray<string> | number | undefined
popovertarget?: string | undefined
popovertargetaction?: HTMLAttributePopoverTargetAction | undefined

// React 19 compatibility
formAction?: string | Function | undefined
Expand Down Expand Up @@ -462,6 +468,8 @@ export namespace JSX {
type?: HTMLInputTypeAttribute | undefined
value?: string | ReadonlyArray<string> | number | undefined
width?: number | string | undefined
popovertarget?: string | undefined
popovertargetaction?: HTMLAttributePopoverTargetAction | undefined

// React 19 compatibility
formAction?: string | Function | undefined
Expand Down

0 comments on commit bc2b7cf

Please sign in to comment.