theme-ui icon indicating copy to clipboard operation
theme-ui copied to clipboard

ThemeProvider can be accidentally imported from Emotion. Consider renaming to ThemeUIProvider?

Open timfee opened this issue 4 years ago • 2 comments

To Reproduce See: https://codesandbox.io/s/silent-surf-4omzj Using the latest version of everything on Next.js

Expected behavior Based on the documentation:

By default, the ThemeProvider component will apply styles in theme.styles.root to the <html> element.

This isn't happening in my instance. While I don't mind manually adding stuff, I wanted to make sure I wasn't doing anything awry :)

timfee avatar Sep 07 '21 02:09 timfee

Hey @timfee 👋 Thanks for the issue!

You imported ThemeProvider from @emotion/react, not from theme-ui.

It's kind of our fault — in the world with auto-imports we should have used a unique name.

hasparus avatar Sep 07 '21 10:09 hasparus

Ah man, tricky :)

I also wonder if having more context in documentation could help. For instance, the only real place with all of the boilerplate code is in Getting Started, and it’s tough to find theme provider details and examples elsewhere on the site.

Thank you for the help!!

timfee avatar Sep 07 '21 14:09 timfee

:rocket: Issue was released in v0.16.0 :rocket:

hasparus avatar Jun 15 '23 15:06 hasparus