diff --git a/packages/react-resizable-panels/src/Panel.ts b/packages/react-resizable-panels/src/Panel.ts index b71eb6f2..5873afc9 100644 --- a/packages/react-resizable-panels/src/Panel.ts +++ b/packages/react-resizable-panels/src/Panel.ts @@ -54,10 +54,9 @@ export type ImperativePanelHandle = { resize: (size: number) => void; }; -export type PanelProps = Omit< - HTMLAttributes, - "id" | "onResize" -> & +export type PanelProps< + T extends keyof HTMLElementTagNameMap = keyof HTMLElementTagNameMap, +> = Omit, "id" | "onResize"> & PropsWithChildren<{ className?: string; collapsedSize?: number | undefined; @@ -71,7 +70,7 @@ export type PanelProps = Omit< onResize?: PanelOnResize; order?: number; style?: object; - tagName?: keyof HTMLElementTagNameMap; + tagName?: T; }>; export function PanelWithForwardedRef({