next-learn
next-learn copied to clipboard
Update classname props to svg props in LinkIcon in nav-links.tsx
Thee @heroicons/react library exports SVG icons as React components. These components accept all standard SVG props. However, the className prop passed into the component wasn't working as expected because SVGs have their own set of CSS properties.
Instead of using className, using the width and height props directly on the LinkIcon component works perfectly
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| next-learn-starter | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jan 29, 2024 4:02am |
| next-seo-starter | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jan 29, 2024 4:02am |
@scifisatan is attempting to deploy a commit to the Vercel Team on Vercel.
A member of the Team first needs to authorize it.
I found the issue while trying to mimick the Navbar but wasn't able to size the svg no matter what. Later I tried to look into it due to its strange behaviour and i found that using classname instead of svg properties was the issue for me. I was seeking through this specific code but this issue might persist on other sections of the codebase as well.