Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Heading component doesnt get theme styles #1131

Closed
FutureKode opened this issue Aug 14, 2020 · 2 comments
Closed

Heading component doesnt get theme styles #1131

FutureKode opened this issue Aug 14, 2020 · 2 comments

Comments

@FutureKode
Copy link

Describe the bug
Heading component doesn't get theme styles from styles: { h2: {} } for example.

Additional context
NextJS app with typescript. Something to do with as="" prop?

@jonashaefele
Copy link

I think you might be running into the same issue I described in #1130

That seems to be a general issue with theme-ui in Next.js. As far as I could find, it might be a Next.js issue. In both TS and JSX. But they closed the issue there... Still trying to get to the bottom of it. More details in #1130

To verify if you're having the same issue, can you check if heading styles are missing

  • only in MDX pages, with # Headings
  • or also when you import { Styled } from 'theme-ui' and then render <Styled.h1>Some Heading</Styled.h1>

@FutureKode
Copy link
Author

@jonashaefele Hey man,

wow ok <Styled.h2> works for me. I totally missed that in the docs. I was trying to use in a non MDX page.

Hope your issue gets resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants