Replies: 1 comment
-
Hi, KevinStark86, Yes, it is possible to use props to adapt CSS in styled-components in Next.js 13 with the SWC compiler. The styled-components library fully supports this feature and it works seamlessly with Next.js. Here's an example of how you can use props to adapt CSS in a styled component with Next.js and styled-components: import styled from 'styled-components'; const Button = styled.button function App() { Normal Button Primary Button } I hope that make sense to you. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have followed the Next JS documentation specifically for using styled components with SWC. However, I've never been able to adapt CSS based on props. Many people have said styled components works fine with Next 13 and SWC, but when pressed it always transpires that they've never tried to adapt css using props. As a result, I'm looking for a definitive answer on the matter.
Is it possible to adapt css in styled components using props in Next JS 13 using the SWC compiler?
Beta Was this translation helpful? Give feedback.
All reactions