Skip to content

Commit 7cc9471

Browse files
authored
Merge pull request #33 from editor-js/new/codex-icon
Standardize the `inline-code` plugin toolbox icon with `codexteam/icons`
2 parents 3722d14 + 389e705 commit 7cc9471

File tree

5 files changed

+15
-8
lines changed

5 files changed

+15
-8
lines changed

assets/icon.svg

-1
This file was deleted.

package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@editorjs/inline-code",
3-
"version": "1.3.1",
3+
"version": "1.4.0",
44
"keywords": [
55
"codex editor",
66
"inline",
@@ -30,5 +30,8 @@
3030
"style-loader": "^0.21.0",
3131
"webpack": "^4.29.5",
3232
"webpack-cli": "^3.2.3"
33+
},
34+
"dependencies": {
35+
"@codexteam/icons": "^0.0.5"
3336
}
3437
}

src/index.js

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
/**
22
* Build styles
33
*/
4-
require('./index.css').toString();
4+
import './index.css';
5+
import { IconInlineCode } from '@codexteam/icons'
56

67
/**
78
* Inline Code Tool for the Editor.js
89
*
910
* Allows to wrap inline fragment and style it somehow.
1011
*/
11-
class InlineCode {
12+
export default class InlineCode {
1213
/**
1314
* Class name for term-tag
1415
*
@@ -166,7 +167,7 @@ class InlineCode {
166167
* @return {string}
167168
*/
168169
get toolboxIcon() {
169-
return require('./../assets/icon.svg').default;
170+
return IconInlineCode;
170171
}
171172

172173
/**
@@ -181,5 +182,3 @@ class InlineCode {
181182
};
182183
}
183184
}
184-
185-
module.exports = InlineCode;

webpack.config.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ module.exports = {
3636
publicPath: '/',
3737
filename: 'bundle.js',
3838
library: 'InlineCode',
39-
libraryTarget: 'umd'
39+
libraryTarget: 'umd',
40+
libraryExport: 'default'
4041
}
4142
};

yarn.lock

+5
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,11 @@
526526
lodash "^4.17.11"
527527
to-fast-properties "^2.0.0"
528528

529+
"@codexteam/icons@^0.0.5":
530+
version "0.0.5"
531+
resolved "https://registry.yarnpkg.com/@codexteam/icons/-/icons-0.0.5.tgz#d17f39b6a0497c6439f57dd42711817a3dd3679c"
532+
integrity sha512-s6H2KXhLz2rgbMZSkRm8dsMJvyUNZsEjxobBEg9ztdrb1B2H3pEzY6iTwI4XUPJWJ3c3qRKwV4TrO3J5jUdoQA==
533+
529534
"@webassemblyjs/[email protected]":
530535
version "1.8.3"
531536
resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.8.3.tgz#63a741bd715a6b6783f2ea5c6ab707516aa215eb"

0 commit comments

Comments
 (0)