Turn an SVG into a typed React component that forwards props, with hard-coded fills swapped for currentColor so the icon takes the text color.
The result appears hereBecause an icon should take the color of the text beside it. With fill and stroke set to currentColor, text-muted-foreground on a parent tints the icon too, and one component covers every place it appears.
The spread on the root svg lets a caller pass className, width, aria-hidden or an onClick without the component having to declare each one. It is the same shape lucide and every icon set use.
Yes. The SVG is read with the XML parser rather than the HTML one, which is what keeps camelCased attributes such as viewBox, strokeWidth and preserveAspectRatio intact.