Cannot Nextjs Component (Link) using styled-components

I am trying to styled Link Component provided by NextJS using Styled-Components.
I have done all the setup including babel-plugin-styled-components, creating _document.js in /pages. But still I am unable to Style the link component.

For setup, I have followed this article:

This is working fine

const StyledComponent = Styled.a`
    color: red;

But this does not

const StyledComponent = Styled(Link)`
    color: red;

Can anyone pls tell me what am I missing? What has to be done now?

Any help will be appreciated.

Source: CSS – Stack Overflow

November 25, 2021
Category : News
Tags: css | next.js | server-side-rendering | styled-components

Leave a Reply

Your email address will not be published. Required fields are marked *

Sitemap | Terms | Privacy | Cookies | Advertising

Senior Software Developer

Creator of @LzoMedia I am a backend software developer based in London who likes beautiful code and has an adherence to standards & love's open-source.