In my Next.js project , I am using markdown-to-jsx for my markdown files. I want to use css-modules classes for my markdown but don't know how to do it.
Inside markdown file I have tried
<p className={styles.test}>Lorem Ipsum..</p>
but it is not parsing and gives class=styles.test . I know that using Markdown component I can override this behaviour , but I want to be more specific.
<Markdown
options={{
overrides:{
p:{
props:{
className:styles.test
}
}
}
}}
>
But doing so will affect all of the p tags. I want to know if it is possible to use css-modules inside of markdown.