Skip to content

Commit 37a5e8d

Browse files
authored
Merge pull request #9 from editor-js/new-icon
Improve icon size to correspond new Toolbar style in 2.16
2 parents 522f4bc + db60976 commit 37a5e8d

7 files changed

Lines changed: 49 additions & 535 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: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@editorjs/inline-code",
3-
"version": "1.3.0",
3+
"version": "1.3.1",
44
"keywords": [
55
"codex editor",
66
"inline",
@@ -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.css

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
.inline-code {
2-
background: rgba(251,241,241,0.78);
3-
color: #C44545;
4-
padding: 4px 6px;
5-
border-radius: 2px;
6-
margin: 0 2px;
7-
font-family: Menlo, Monaco, Consolas, Courier New, monospace;
8-
font-size: 0.9em;
2+
background: rgba(250, 239, 240, 0.78);
3+
color: #b44437;
4+
padding: 3px 4px;
5+
border-radius: 5px;
6+
margin: 0 1px;
7+
font-family: inherit;
8+
font-size: 0.86em;
9+
font-weight: 500;
10+
letter-spacing: 0.3px;
911
}

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
},

yarn.lock

Lines changed: 27 additions & 525 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)