From f42565fb04baa2a1f7768ede69babc06565c52ae Mon Sep 17 00:00:00 2001
From: chris <kokosias@yahoo.gr>
Date: Sat, 19 Nov 2022 18:17:01 +0200
Subject: [PATCH] info tool

---
 wax-prosemirror-components/index.js                        | 2 --
 .../CounterInfoService/CounterInfoTool.js                  | 7 +++----
 .../CounterInfoService/components}/EditorInfoTool.js       | 2 +-
 3 files changed, 4 insertions(+), 7 deletions(-)
 rename {wax-prosemirror-components/src/components/EditorInfo/CounterInfo => wax-prosemirror-services/src/BottomInfoService/CounterInfoService/components}/EditorInfoTool.js (99%)

diff --git a/wax-prosemirror-components/index.js b/wax-prosemirror-components/index.js
index 546430148..124f1de51 100644
--- a/wax-prosemirror-components/index.js
+++ b/wax-prosemirror-components/index.js
@@ -6,7 +6,5 @@ export { default as Icon } from './src/helpers/Icon';
 export { default as ToolGroupComponent } from './src/components/ToolGroupComponent';
 export { default as ToolGroups } from './src/components/ToolGroups';
 
-export { default as EditorInfoTool } from './src/components/EditorInfo/CounterInfo/EditorInfoTool';
-
 export { default as Tabs } from './src/ui/tabs/Tabs';
 export { default as BlockLevelTools } from './src/ui/tabs/BlockLevelTools';
diff --git a/wax-prosemirror-services/src/BottomInfoService/CounterInfoService/CounterInfoTool.js b/wax-prosemirror-services/src/BottomInfoService/CounterInfoService/CounterInfoTool.js
index 3e4121989..d091d5425 100644
--- a/wax-prosemirror-services/src/BottomInfoService/CounterInfoService/CounterInfoTool.js
+++ b/wax-prosemirror-services/src/BottomInfoService/CounterInfoService/CounterInfoTool.js
@@ -1,13 +1,12 @@
 import React from 'react';
 import { isEmpty } from 'lodash';
 import { injectable } from 'inversify';
-import { EditorInfoTool } from 'wax-prosemirror-components';
 import { Tools } from 'wax-prosemirror-core';
+import EditorInfoTool from './components/EditorInfoTool';
 
 @injectable()
 class CounterInfoTool extends Tools {
   title = 'Counter Info';
-  icon = 'highlight';
   name = 'CounterInfo';
 
   get run() {
@@ -15,7 +14,7 @@ class CounterInfoTool extends Tools {
   }
 
   get enable() {
-    return state => {
+    return () => {
       return true;
     };
   }
@@ -24,7 +23,7 @@ class CounterInfoTool extends Tools {
     if (isEmpty(view)) return null;
     // eslint-disable-next-line no-underscore-dangle
     return this._isDisplayed ? (
-      <EditorInfoTool key="CounterInfo" item={this.toJSON()} view={view} />
+      <EditorInfoTool item={this.toJSON()} key="CounterInfo" view={view} />
     ) : null;
   }
 }
diff --git a/wax-prosemirror-components/src/components/EditorInfo/CounterInfo/EditorInfoTool.js b/wax-prosemirror-services/src/BottomInfoService/CounterInfoService/components/EditorInfoTool.js
similarity index 99%
rename from wax-prosemirror-components/src/components/EditorInfo/CounterInfo/EditorInfoTool.js
rename to wax-prosemirror-services/src/BottomInfoService/CounterInfoService/components/EditorInfoTool.js
index d78734e93..3b9001c02 100644
--- a/wax-prosemirror-components/src/components/EditorInfo/CounterInfo/EditorInfoTool.js
+++ b/wax-prosemirror-services/src/BottomInfoService/CounterInfoService/components/EditorInfoTool.js
@@ -14,7 +14,7 @@ import {
   DocumentHelpers,
   useOnClickOutside,
 } from 'wax-prosemirror-core';
-import MenuButton from '../../../ui/buttons/MenuButton';
+import { MenuButton } from 'wax-prosemirror-components';
 
 const Wrapper = styled.div`
   font-size: 0;
-- 
GitLab