Skip to content

Commit 8e64a65

Browse files
committed
Improve icon size
1 parent 522f4bc commit 8e64a65

6 files changed

Lines changed: 39 additions & 527 deletions

File tree

assets/icon.svg

Lines changed: 1 addition & 0 deletions
Loading

dist/bundle.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"@babel/preset-env": "^7.3.4",
2727
"babel-loader": "^8.0.5",
2828
"css-loader": "^1.0.0",
29+
"raw-loader": "^3.1.0",
2930
"style-loader": "^0.21.0",
3031
"webpack": "^4.29.5",
3132
"webpack-cli": "^3.2.3"

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ class InlineCode {
166166
* @return {string}
167167
*/
168168
get toolboxIcon() {
169-
return '<svg width="19" height="13" viewBox="0 0 19 13" xmlns="http://www.w3.org/2000/svg"><path d="M17.839 5.525a1.105 1.105 0 0 1-.015 1.547l-4.943 4.943a1.105 1.105 0 1 1-1.562-1.562l4.137-4.137-4.078-4.078A1.125 1.125 0 1 1 12.97.648l4.796 4.796c.026.026.05.053.074.08zm-14.952.791l4.137 4.137a1.105 1.105 0 1 1-1.562 1.562L.519 7.072a1.105 1.105 0 0 1-.015-1.547c.023-.028.048-.055.074-.081L5.374.647a1.125 1.125 0 0 1 1.591 1.591L2.887 6.316z" id="a"/></svg>';
169+
return require('./../assets/icon.svg').default;
170170
}
171171

172172
/**

webpack.config.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@ module.exports = {
2020
'style-loader',
2121
'css-loader'
2222
]
23+
},
24+
{
25+
test: /\.(svg)$/,
26+
use: [
27+
{
28+
loader: 'raw-loader',
29+
}
30+
]
2331
}
2432
]
2533
},

0 commit comments

Comments
 (0)