Skip to content

Commit

Permalink
chore: explicitly type Global return value to work around "Global can…
Browse files Browse the repository at this point in the history
…not be named without a reference"
  • Loading branch information
hasparus committed Jan 22, 2023
1 parent 8bc670a commit af0ed1c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/global/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import { jsx, type ThemeUIStyleObject } from '@theme-ui/core'
import { css, type Theme } from '@theme-ui/css'
import { Global as EmotionGlobal } from '@emotion/react'

const Global = ({ styles }: { styles: ThemeUIStyleObject }) =>
export interface GlobalProps {
styles: ThemeUIStyleObject
}
const Global = ({ styles }: GlobalProps): JSX.Element =>
jsx(EmotionGlobal, {
styles: (emotionTheme: unknown) => {
const theme = emotionTheme as Theme
Expand Down

0 comments on commit af0ed1c

Please sign in to comment.