Skip to content

Commit

Permalink
Merge pull request #29 from editor-js/update-icons
Browse files Browse the repository at this point in the history
Update toolbox icon
  • Loading branch information
TatianaFomina authored Nov 29, 2022
2 parents 48bf650 + e4f1868 commit 86e8c55
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 599 deletions.
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@editorjs/delimiter",
"version": "1.2.0",
"version": "1.3.0",
"keywords": [
"codex editor",
"delimiter",
Expand Down Expand Up @@ -30,5 +30,8 @@
"style-loader": "^0.21.0",
"webpack": "^4.29.5",
"webpack-cli": "^3.2.3"
},
"dependencies": {
"@codexteam/icons": "^0.0.5"
}
}
9 changes: 5 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
/**
* Build styles
*/
require('./index.css').toString();
import './index.css';

import { IconDelimiter } from '@codexteam/icons'

/**
* Delimiter Block for the Editor.js.
Expand All @@ -16,7 +18,7 @@ require('./index.css').toString();
* @typedef {Object} DelimiterData
* @description Tool's input and output data format
*/
class Delimiter {
export default class Delimiter {

/**
* Notify core that read-only mode is supported
Expand Down Expand Up @@ -97,10 +99,9 @@ class Delimiter {
*/
static get toolbox() {
return {
icon: `<svg width="19" height="4" viewBox="0 0 19 4" xmlns="http://www.w3.org/2000/svg"><path d="M1.25 0H7a1.25 1.25 0 1 1 0 2.5H1.25a1.25 1.25 0 1 1 0-2.5zM11 0h5.75a1.25 1.25 0 0 1 0 2.5H11A1.25 1.25 0 0 1 11 0z"/></svg>`,
icon: IconDelimiter,
title: 'Delimiter'
};
}
}

module.exports = Delimiter;
3 changes: 2 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ module.exports = {
publicPath: '/',
filename: 'bundle.js',
library: 'Delimiter',
libraryTarget: 'umd'
libraryTarget: 'umd',
libraryExport: 'default'
}
};
Loading

0 comments on commit 86e8c55

Please sign in to comment.