doczjs / docz

✍ It has never been so easy to document your things!
https://docz.site
MIT License
23.6k stars 1.46k forks source link

Styles don't work with styled-components + react-native #1609

Open felipefialho opened 3 years ago

felipefialho commented 3 years ago

Question

Description

Hi! First congratz for this awesome project 😁

We have a monorepo using react-native + styled-components (with xstyled) and it was perfectly working in the last major of Docz (1.x).

But after update to Docz 2.x we have been with problems run it, basically just inline styles of react-native works and all styling that using styled-components have been ignored inside Playground.

Environment

Additional context/Screenshots

image

We (@brunobertolini, @diegotsi) have tried a lot of things to fix it but we have not been able to advance in the resolutions 😅

Someone can help us with this question?

diegotsi commented 3 years ago

Hi! We finally figured out the main problem with docz and our react native app. And it's very simple.

We are using xstyled, and this lib export styled from styled-components web, so we test two scenarios

1 . Styled our components using import styled from 'styled-components' and it does not work.

  1. Styled our components using import styled from 'styled-components/native' and it's work like a charm ❤️

So for everyone, that's stuck with this problem just check if you are using styled from the native package inside styled-components.