diff --git a/.changeset/light-seals-judge.md b/.changeset/light-seals-judge.md new file mode 100644 index 000000000..1b94d4247 --- /dev/null +++ b/.changeset/light-seals-judge.md @@ -0,0 +1,5 @@ +--- +'@emotion/react': patch +--- + +Fix Theme import for newer Typescript module resolution modes diff --git a/packages/react/types/css-prop.d.ts b/packages/react/types/css-prop.d.ts index 6f35b6bfa..f0fb0361b 100644 --- a/packages/react/types/css-prop.d.ts +++ b/packages/react/types/css-prop.d.ts @@ -1,6 +1,6 @@ import {} from 'react' import { Interpolation } from '@emotion/serialize' -import { Theme } from '.' +import { Theme } from '@emotion/react' declare module 'react' { interface Attributes { diff --git a/packages/react/types/jsx-namespace.d.ts b/packages/react/types/jsx-namespace.d.ts index 101c582ac..f054601e5 100644 --- a/packages/react/types/jsx-namespace.d.ts +++ b/packages/react/types/jsx-namespace.d.ts @@ -1,6 +1,6 @@ import 'react' import { Interpolation } from '@emotion/serialize' -import { Theme } from './index' +import { Theme } from '@emotion/react' type WithConditionalCSSProp

= 'className' extends keyof P ? string extends P['className' & keyof P]