styled-components / xstyled

A utility-first CSS-in-JS framework built for React. 💅👩‍🎤⚡️
https://xstyled.dev
MIT License
2.27k stars 106 forks source link

fix(types): fix emotion createGlobalStyle type def #318

Closed AlfonzAlfonz closed 2 years ago

AlfonzAlfonz commented 2 years ago

Summary

Fix createGlobalStyle in @xstyled/emotion to work the same way as its styled-components counterpart.

import { createGlobalStyle } from "@xstyled/emotion";

// This doesn't work
const GlobalStyle = createGlobalStyle<Props>`

...

`

import { createGlobalStyle } from "@xstyled/styled-components";

// This works as expected
const GlobalStyle = createGlobalStyle<Props>`

...

`