Skip to content

Commit

Permalink
Merge pull request #25 from editor-js/new/codex-icon
Browse files Browse the repository at this point in the history
Standardize the icon with `codexteam/icons`
  • Loading branch information
robonetphy authored Nov 30, 2022
2 parents 8d85337 + be1914c commit 8f8b1d4
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,8 @@
"style-loader": "^1.2.1",
"webpack": "^4.43.0",
"webpack-cli": "^3.3.11"
},
"dependencies": {
"@codexteam/icons": "^0.0.6"
}
}
3 changes: 0 additions & 3 deletions src/assets/underline.svg

This file was deleted.

11 changes: 5 additions & 6 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
/**
* Build styles
*/
require('./index.css').toString();
import './index.css';
import { IconUnderline } from '@codexteam/icons'

/**
/**
* Underline Tool for the Editor.js
*
* Allows to wrap inline fragment and style it somehow.
*/
class Underline {
export default class Underline {
/**
* Class name for term-tag
*
Expand Down Expand Up @@ -169,7 +170,7 @@ class Underline {
* @returns {string}
*/
get toolboxIcon() {
return require('./assets/underline.svg').default;
return IconUnderline;
}

/**
Expand All @@ -185,5 +186,3 @@ class Underline {
};
}
}

module.exports = Underline;
3 changes: 2 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ module.exports = {
publicPath: '/',
filename: 'bundle.js',
library: 'Underline',
libraryTarget: 'umd'
libraryTarget: 'umd',
libraryExport: 'default'
}
};
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -701,6 +701,11 @@
lodash "^4.17.13"
to-fast-properties "^2.0.0"

"@codexteam/icons@^0.0.6":
version "0.0.6"
resolved "https://registry.yarnpkg.com/@codexteam/icons/-/icons-0.0.6.tgz#5553ada48dddf5940851ccc142cfe17835c36ad3"
integrity sha512-L7Q5PET8PjKcBT5wp7VR+FCjwCi5PUp7rd/XjsgQ0CI5FJz0DphyHGRILMuDUdCW2MQT9NHbVr4QP31vwAkS/A==

"@types/json-schema@^7.0.4":
version "7.0.4"
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.4.tgz#38fd73ddfd9b55abb1e1b2ed578cb55bd7b7d339"
Expand Down

0 comments on commit 8f8b1d4

Please sign in to comment.