I am currently working on a component that I want to make clickable. However, when I wrap them in a <Link>
element (from react-router-dom) or set component={Link} to=""
on them, all the text inside them automatically becomes hyperlinks. For example:
https://i.stack.imgur.com/JKUsK.png
In the image above, there are four buttons, with the last three being wrapped in <Link>
tags. I do not want the styling of those buttons to change. While I understand that I can remove the underline and other styles using CSS, it seems cumbersome to have to do it for everything inside the link tag.
This issue also arises when I add component={Link} to=""
to a container that contains images, Typography, and other elements - causing all text to become hyperlinked as well.
Could you please advise on how to prevent everything inside a Link from being styled as a hyperlink?