Skip to content

Commit

Permalink
Define DOMProps via HTMLAttributes
Browse files Browse the repository at this point in the history
  • Loading branch information
alecmev committed Aug 29, 2024
1 parent de41e1f commit 0ad564b
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions packages/@react-types/shared/src/dom.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
FormEventHandler,
HTMLAttributeAnchorTarget,
HTMLAttributeReferrerPolicy,
HTMLAttributes,
DOMAttributes as ReactDOMAttributes,
ReactEventHandler
} from 'react';
Expand Down Expand Up @@ -55,12 +56,7 @@ export interface AriaValidationProps {

// A set of common DOM props that are allowed on any component
// Ensure this is synced with DOMPropNames in filterDOMProps
export interface DOMProps {
/**
* The element's unique identifier. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id).
*/
id?: string | undefined
}
export interface DOMProps extends Pick<HTMLAttributes<HTMLElement>, 'id'> {}

export interface FocusableDOMProps extends DOMProps {
/**
Expand Down

0 comments on commit 0ad564b

Please sign in to comment.