rebassjs / rebass

:atom_symbol: React primitive UI components built with styled-system.
https://rebassjs.org
MIT License
7.94k stars 656 forks source link

@emotion/react ThemeProvider not working #1111

Open marcoamonteiro opened 3 years ago

marcoamonteiro commented 3 years ago

To reproduce:

Simple example from the rebass documentation and create-react-app: https://rebassjs.org/getting-started

import React from 'react';
import './App.css';
import {Heading} from 'rebass'
import { ThemeProvider } from '@emotion/react'
import styled from '@emotion/styled'

const theme = ...

function App() {
  return (
      <ThemeProvider theme={theme}>
        <div className="app">
          <Heading fontSize={7}>Hello</Heading>
        </div>
      </ThemeProvider>
  );
}

Expected behavior:

Theme is not applied to Rebass components

Environment information:

rjerue commented 3 years ago

Instead of @emiton/react, emotion-theming": "^10.0.27" does work for me, though I agree the behavior is not intended/poor.

Rebass seems dead though :(

anujmv commented 2 years ago

Same issue with theme-ui provider, styles are not being applied. works with older version of theme-ui