-
-
Notifications
You must be signed in to change notification settings - Fork 431
Closed
Milestone
Description
As mentioned in #75, it would be nice to be able to specify a title using props. To do it, my proposition is to add a boolean option "titleProp" defaulting to false
. When activated, user would be able to specify the title of the SVG using props.
Usage in command line
svgr --title-prop
Usage in Node / Webpack
transform("...", { titleProp: true })
Usage in React, when the option is activated
import SvgrComponent from './SvgrComponent'
<SvgrComponent title="This is a title" />
// The output will be:
// <svg><title>This is a title</title></svg>
// Instead of:
// <svg title="This is a title" />
Metadata
Metadata
Assignees
Labels
No labels