From fbe08117973da8ee62ca51bf2976846b227ad23d Mon Sep 17 00:00:00 2001 From: pawelblaszczyk5 Date: Fri, 1 Nov 2024 22:52:06 +0100 Subject: [PATCH] Consistently use React namespace to use JSX types --- src/types.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/types.ts b/src/types.ts index 65e53df..d4f46a1 100644 --- a/src/types.ts +++ b/src/types.ts @@ -12,8 +12,8 @@ export type CSSRule = [className: string, rule?: string] type ClassNameMessage = 'Component must accept a className prop' -export type AcceptsClassName = T extends keyof JSX.IntrinsicElements - ? 'className' extends keyof JSX.IntrinsicElements[T] +export type AcceptsClassName = T extends keyof React.JSX.IntrinsicElements + ? 'className' extends keyof React.JSX.IntrinsicElements[T] ? T : ClassNameMessage : T extends React.ComponentType @@ -34,7 +34,7 @@ export declare namespace RestyleJSX { export type IntrinsicClassAttributes = React.JSX.IntrinsicClassAttributes export type IntrinsicElements = { - [K in keyof JSX.IntrinsicElements]: React.JSX.IntrinsicElements[K] & { + [K in keyof React.JSX.IntrinsicElements]: React.JSX.IntrinsicElements[K] & { css?: CSSObject } }