Closed stefanprobst closed 1 year ago
Hey! Thank you for your PR! Much appreciated! 🙏
I don't think this is necessary because all props are already added to the SVG (e.g.: https://unpkg.com/browse/@heroicons/react@2.0.8/20/solid/AcademicCapIcon.js)
Here is an example in a CodeSandbox. If you look at the DOM you will see the title
attribute: https://codesandbox.io/s/hardcore-pond-p51n6x?file=/src/App.js
hi, the titleProp
option adds a title
element as a child of the svg
(not a title
attribute on the svg
) - i think for svgs this is the appropriate approach (?)
actually, hovering over the svg in your codesandbox does not show a title tooltip for me
Aha yeah ok that makes sense. Thanks for the PR!
This enables
svgr
'stitleProp
option which allows adding a<title>
to jsx icons via prop.