gatsby-plugin-material-ui icon indicating copy to clipboard operation
gatsby-plugin-material-ui copied to clipboard

Support styled-components

Open mlenser opened this issue 2 years ago • 1 comments

styled-components is an official option for MUI 5 on https://mui.com/getting-started/installation/:

MUI is using emotion as a styling engine by default. If you want to use styled-components instead, run: // with yarn yarn add @mui/material @mui/styled-engine-sc styled-components

Can styled-components be supported ny this plugin? Thanks

mlenser avatar Feb 13 '22 13:02 mlenser

As this document says https://mui.com/material-ui/guides/styled-engine/

❗ Warning: Using styled-components as an engine at this moment is not working when used in a SSR projects. The reason is that the babel-plugin-styled-components is not picking up correctly the usages of the styled() utility inside the @mui packages. For more details, take a look at this issue. We strongly recommend using emotion for SSR projects.

I think it's better to use emotion.

Talaxy009 avatar Nov 09 '22 14:11 Talaxy009