Skip to content

Commit

Permalink
Merge pull request #10 from editor-js/new/codex-icon
Browse files Browse the repository at this point in the history
Standardize the `link-autocomplete` plugin toolbox icon with `codexteam/icons`
  • Loading branch information
robonetphy authored Nov 30, 2022
2 parents c9c8187 + 9f92837 commit b61d79e
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
3 changes: 0 additions & 3 deletions icons/link.svg

This file was deleted.

3 changes: 0 additions & 3 deletions icons/unlink.svg

This file was deleted.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@editorjs/link-autocomplete",
"version": "0.0.0",
"version": "0.1.0",
"description": "Link Autocomplete Inline Tool for EditorJS",
"main": "dist/link-autocomplete.js",
"repository": "https://github.com/editor-js/link-autocomplete.git",
Expand Down Expand Up @@ -29,5 +29,8 @@
"style-loader": "^2.0.0",
"webpack": "^5.24.1",
"webpack-cli": "^4.5.0"
},
"dependencies": {
"@codexteam/icons": "^0.0.5"
}
}
6 changes: 3 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import './../styles/index.pcss';
* Import deps
*/
import notifier from 'codex-notifier';

import { IconUnlink, IconLink } from '@codexteam/icons';
/**
* Import functions
*/
Expand Down Expand Up @@ -227,7 +227,7 @@ export default class LinkAutocomplete {
* @type {HTMLSpanElement}
*/
this.nodes.toolButtonLink = Dom.make('span', LinkAutocomplete.CSS.iconWrapper, {
innerHTML: require('../icons/link.svg'),
innerHTML: IconLink,
});
this.nodes.toolButtons.appendChild(this.nodes.toolButtonLink);

Expand All @@ -237,7 +237,7 @@ export default class LinkAutocomplete {
* @type {HTMLSpanElement}
*/
this.nodes.toolButtonUnlink = Dom.make('span', LinkAutocomplete.CSS.iconWrapper, {
innerHTML: require('../icons/unlink.svg'),
innerHTML: IconUnlink,
});
this.nodes.toolButtons.appendChild(this.nodes.toolButtonUnlink);
this.toggleVisibility(this.nodes.toolButtonUnlink, false);
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@
chalk "^2.0.0"
js-tokens "^4.0.0"

"@codexteam/icons@^0.0.5":
version "0.0.5"
resolved "https://registry.yarnpkg.com/@codexteam/icons/-/icons-0.0.5.tgz#d17f39b6a0497c6439f57dd42711817a3dd3679c"
integrity sha512-s6H2KXhLz2rgbMZSkRm8dsMJvyUNZsEjxobBEg9ztdrb1B2H3pEzY6iTwI4XUPJWJ3c3qRKwV4TrO3J5jUdoQA==

"@discoveryjs/json-ext@^0.5.0":
version "0.5.2"
resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.2.tgz#8f03a22a04de437254e8ce8cc84ba39689288752"
Expand Down

0 comments on commit b61d79e

Please sign in to comment.