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 } }