ThemeProvider divergence between @theme-ui/core and theme-ui
See original GitHub issueDescribe the bug
Implementation of ThemeProvider
is inconsistent depending on what package you pull it from. theme-ui
looks to be re-exporting it from @theme-ui/theme-provider
, while @theme-ui/core
ships its own (simpler) implementation.
While @theme-ui/theme-provider
is in-line with the documentation (BodyStyles
, et al), blames suggest both have been updated in relatively recent past - so not sure which is the canonical implementation.
To Reproduce Steps to reproduce the behavior:
- Check sources
- Notice diverging implementations
(or alternatively, try to use the ThemeProvider
from @theme-ui/core
and notice it doesn’t touch the body styles).
Expected behavior Both packages implement the same behaviour
Screenshots N/A
Additional context N/A
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
theme-ui/core
As @theme-ui/core defines jsx function and types for it, you can use it to configure JSX runtime without installing theme-ui package. Entry point...
Read more >Breaking changes in v5, part one: styles and themes - MUI
This is a reference guide to all of the breaking changes introduced in Material v5, and how to handle them when migrating from...
Read more >Nested ThemeProvider overrides theme style definition
I can't think of a reason you would have to do that. ... import { createTheme, ThemeProvider } from "@material-ui/core/styles"; ...
Read more >Intro to Theme UI - Janessa Garrow
Theme UI components have a default "variant", which in the case of Button is called "primary". In many cases, there are other built-in...
Read more >Quickly set up a theme in Material-UI and access it in your ...
Add a customisable Material-UI theme to your React app ... import { ThemeProvider } from '@material-ui/core/styles'
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for the explanation, ackwell! Yup, I can see how it’s confusing now. Okay, I think we can do a few things
ThemeUICoreProvider
.theme-ui
.@theme-ui/theme-provider
? It can be used in aMDX+ThemeContext+ColorModes
bundle without@theme-ui/components
(included intheme-ui
), so it could be documented.@ackwell good catch - is seems
@theme-ui/theme-provider
is just slightly newer (4 months) vs@theme-ui/core
(5 months)imho, we should keep
@theme-ui/theme-provider
, but since in both cases @hasparus has been involved maybe he has more information.