File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed
Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -5,8 +5,8 @@ import type {
55 ComponentProps ,
66 ComponentType ,
77 FC ,
8+ JSX ,
89 PropsWithChildren ,
9- ReactHTML ,
1010} from 'react' ;
1111
1212type UseUnitConfig = Parameters < typeof useUnit > [ 1 ] ;
@@ -239,11 +239,6 @@ export function variant<
239239) : FC < FinalProps < Props , Bind > > ;
240240
241241// fromTag types
242- type GetProps < HtmlTag extends keyof ReactHTML > = Exclude <
243- Parameters < ReactHTML [ HtmlTag ] > [ 0 ] ,
244- null | undefined
245- > ;
246-
247242/**
248243 *
249244 * Simple helper to allow to use `reflect` with any valid html tag
@@ -264,6 +259,6 @@ type GetProps<HtmlTag extends keyof ReactHTML> = Exclude<
264259 * })
265260 * ```
266261 */
267- export function fromTag < HtmlTag extends keyof ReactHTML > (
262+ export function fromTag < HtmlTag extends keyof JSX . IntrinsicElements > (
268263 htmlTag : HtmlTag ,
269- ) : FC < PropsWithChildren < GetProps < HtmlTag > > > ;
264+ ) : ( props : PropsWithChildren < JSX . IntrinsicElements [ HtmlTag ] > ) => React . ReactNode ;
You can’t perform that action at this time.
0 commit comments