You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But if I declare the same component in a separate file the doesn't have the proper className (not styled according to the theme):
import { Test } from'~/components/test';
<Test />
I also have the problem when the component contains titles (h2 for example). But in that case the TOC entry is also missing (both in the inline and imported component).
I'm probably missing something obvious but I'm a bit lost here.
I found that someone has an open issue with a similar question but the current answer doesn't make sense to me (copy pasting the style).
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello, I can't figure out a simple thing. I can't attach (docs) theme to component that are declared in a separate (
.tsx
) file.The following code works as expected and the link is blue and underlined:
But if I declare the same component in a separate file the doesn't have the proper
className
(not styled according to the theme):I also have the problem when the component contains titles (
h2
for example). But in that case the TOC entry is also missing (both in the inline and imported component).I'm probably missing something obvious but I'm a bit lost here.
I found that someone has an open issue with a similar question but the current answer doesn't make sense to me (copy pasting the style).
Beta Was this translation helpful? Give feedback.
All reactions