rebassjs / grid

This package has moved and renamed
https://rebassjs.org/reflexbox
MIT License
2.04k stars 96 forks source link

What is the correct import location for ThemeProvider? #178

Closed daniellizik closed 5 years ago

daniellizik commented 5 years ago

6.0.0-7

As per the docs, it says to import from emotion.

// undefined
import { ThemeProvider } from '@rebass/grid/emotion';

// not a @rebass/grid issue but not found
import { ThemeProvider } from '@emotion/styled';

// dependency not found: styled-components in ./node_modules/@rebass/grid/dist/index.js
import { ThemeProvider } from '@rebass/grid';

I'd like to avoid having to use styled-components as I'm already using @emotion/core and @emotion/styled.

jxnblk commented 5 years ago

It should be import { ThemeProvider } from 'emotion-theming' – the package naming convention is a little off from Emotion's side of things IMO – see https://emotion.sh/docs/theming