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

Using scoped styles with custom react components #705

Open
nodren opened this issue Feb 20, 2021 · 0 comments
Open

Using scoped styles with custom react components #705

nodren opened this issue Feb 20, 2021 · 0 comments

Comments

@nodren
Copy link

nodren commented Feb 20, 2021

I have a whole library of custom react components, there's a className prop which forwards down to a html element.

I want to use scoped styling with these the same way I do with regular HTML elements.

I've seen #147 which appears to have been fixed in #462

However, i'm using 3.4.4 and I'm still having this issue, Here's a basic example:

<Grid className="dark">
  <style jsx>{`
	  .dark {
		  background-color: #000;
	  }
  `}</style>
  ....
</Grid>

it results in a

that has the className "dark" but doesn't include the scoped class name, any ideas?

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

1 participant