diff --git a/components/css-baseline/css-baseline.tsx b/components/css-baseline/css-baseline.tsx index d381f418e..abc24f2cc 100644 --- a/components/css-baseline/css-baseline.tsx +++ b/components/css-baseline/css-baseline.tsx @@ -1,7 +1,8 @@ -import React from 'react' +import React, { ReactElement } from 'react' import useTheme from '../use-theme' import flush from 'styled-jsx/server' -import flushToReact from 'styled-jsx/server' + +export type FlushToReact = (opts?: { nonce?: string }) => Array> const CssBaseline: React.FC> = ({ children }) => { const theme = useTheme() @@ -302,7 +303,7 @@ const CssBaseline: React.FC> = ({ children }) = } type MemoCssBaselineComponent

= React.NamedExoticComponent

& { - flush: typeof flushToReact + flush: FlushToReact } const MemoCssBaseline = React.memo(CssBaseline) as MemoCssBaselineComponent< diff --git a/package.json b/package.json index ee2009db3..d3fc39b11 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@geist-ui/core", - "version": "2.2.4", + "version": "2.2.5", "main": "dist/index.js", "module": "esm/index.js", "types": "esm/index.d.ts", @@ -87,6 +87,7 @@ "inter-ui": "^3.19.3", "jest": "^27.0.5", "next": "^12.0.9-canary.0", + "styled-jsx": "4.0.1", "prettier": "^2.3.1", "react": "^17.0.2", "react-color": "^2.19.3", @@ -102,8 +103,7 @@ "typescript-transform-paths": "^3.3.1" }, "dependencies": { - "@babel/runtime": "^7.16.7", - "styled-jsx": "4.0.1" + "@babel/runtime": "^7.16.7" }, "peerDependencies": { "react": ">=16.9.0", diff --git a/typings/styled.d.ts b/typings/styled.d.ts index 30b27b773..6e8eacefb 100644 --- a/typings/styled.d.ts +++ b/typings/styled.d.ts @@ -1,9 +1,10 @@ -declare global { - declare module 'react' { - interface StyleHTMLAttributes extends React.HTMLAttributes { - jsx?: boolean; - global?: boolean; - } +// Definitions by: @types/styled-jsx + +import 'react' + +declare module 'react' { + interface StyleHTMLAttributes extends HTMLAttributes { + jsx?: boolean + global?: boolean } } -