Allow title to be set when importing SVGs (#7118)

This commit is contained in:
Sudhir Mitharwal
2019-07-15 20:24:19 +05:30
committed by Brody McKee
parent 7c0dfef237
commit dc50dd320e
4 changed files with 9 additions and 15 deletions

View File

@@ -1,7 +1,7 @@
---
name: Bug report
about: Create a report to help us improve
labels: "issue: bug"
labels: 'issue: bug'
---
<!--
@@ -59,7 +59,6 @@ labels: "issue: bug"
(Write your answer here.)
### Which terms did you search for in User Guide?
<!--
@@ -79,7 +78,6 @@ labels: "issue: bug"
(Write your answer here if relevant.)
### Environment
<!--
@@ -96,7 +94,6 @@ labels: "issue: bug"
(paste the output of the command here.)
### Steps to reproduce
<!--
@@ -106,10 +103,9 @@ labels: "issue: bug"
(Write your steps here:)
1.
2.
3.
1.
2.
3.
### Expected behavior
@@ -121,7 +117,6 @@ labels: "issue: bug"
(Write what you thought would happen.)
### Actual behavior
<!--
@@ -132,7 +127,6 @@ labels: "issue: bug"
(Write what happened. Please add screenshots!)
### Reproducible demo
<!--
@@ -153,7 +147,6 @@ labels: "issue: bug"
(Paste the link to an example project and exact instructions to reproduce the issue.)
<!--
What happens if you skip this step?

View File

@@ -1,7 +1,7 @@
---
name: Proposal
about: Suggest an idea for improving Create React App
labels: "issue: proposal"
labels: 'issue: proposal'
---
### Is your proposal related to a problem?
@@ -32,7 +32,7 @@ labels: "issue: proposal"
### Additional context
<!--
Is there anything else you can add about the proposal?
Is there anything else you can add about the proposal?
You might want to link to related issues here, if you haven't already.
-->

View File

@@ -388,7 +388,8 @@ module.exports = function(webpackEnv) {
{
loaderMap: {
svg: {
ReactComponent: '@svgr/webpack?-svgo,+ref![path]',
ReactComponent:
'@svgr/webpack?-svgo,+titleProp,+ref![path]',
},
},
},

View File

@@ -29,7 +29,7 @@
"types": "./lib/react-app.d.ts",
"dependencies": {
"@babel/core": "7.4.3",
"@svgr/webpack": "4.2.0",
"@svgr/webpack": "4.3.1",
"@typescript-eslint/eslint-plugin": "1.10.2",
"@typescript-eslint/parser": "1.10.2",
"babel-eslint": "10.0.1",