menu
announcement

Spectrum is now read-only. Learn more about the decision in our official announcement.

styled-components

Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress!

Channels
Team

How to automatically add className to all the styled-components?

July 7, 2021 at 9:45am

How to automatically add className to all the styled-components?

July 7, 2021 at 9:45am
Hi!
I'm looking for a way to automatically add className to all the styled components (e.q. const MyButton = styled.button `` should then have <button class="MyButton" ... ). since we're creating components which are then used also in other projects and we want to enable for others to be able to target our "sub"-styled components and modify them.
No messages yet