From dc19ec427663f667c55a83c3695ceb94dce7eb5b Mon Sep 17 00:00:00 2001
From: Yannis Barlas <yannisbarlas@gmail.com>
Date: Tue, 22 Sep 2020 20:46:20 +0300
Subject: [PATCH] add codeblock svg

---
 wax-prosemirror-components/src/icons/icons.js   | 17 ++++++++++++++++-
 .../src/CodeBlockService/CodeBlockTool.js       |  3 +--
 2 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/wax-prosemirror-components/src/icons/icons.js b/wax-prosemirror-components/src/icons/icons.js
index 5a0fd2818..5ef226a92 100644
--- a/wax-prosemirror-components/src/icons/icons.js
+++ b/wax-prosemirror-components/src/icons/icons.js
@@ -60,7 +60,7 @@ export default {
   paragraph: <FontAwesomeIcon icon={faParagraph} />,
   heading: <FontAwesomeIcon icon={faHeading} />,
   blockquote: <FontAwesomeIcon icon={faQuoteLeft} />,
-  code_block: <FontAwesomeIcon icon={faFileCode} />,
+  // code_block: <FontAwesomeIcon icon={faFileCode} />,
   // ordered_list: <FontAwesomeIcon icon={faListOl} />,
   // bullet_list: <FontAwesomeIcon icon={faListUl} />,
   // image: <FontAwesomeIcon icon={faImage} />,
@@ -262,4 +262,19 @@ export default {
       <path d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z" />
     </Svg>
   ),
+  codeBlock: ({ className }) => (
+    <Svg
+      className={className}
+      enable-background="new 0 0 24 24"
+      viewBox="0 0 24 24"
+    >
+      <g>
+        <rect fill="none" height="24" width="24" />
+        <circle cx="12" cy="3.5" fill="none" r=".75" />
+        <circle cx="12" cy="3.5" fill="none" r=".75" />
+        <circle cx="12" cy="3.5" fill="none" r=".75" />
+        <path d="M19,3h-4.18C14.4,1.84,13.3,1,12,1S9.6,1.84,9.18,3H5C4.86,3,4.73,3.01,4.6,3.04C4.21,3.12,3.86,3.32,3.59,3.59 c-0.18,0.18-0.33,0.4-0.43,0.64C3.06,4.46,3,4.72,3,5v14c0,0.27,0.06,0.54,0.16,0.78c0.1,0.24,0.25,0.45,0.43,0.64 c0.27,0.27,0.62,0.47,1.01,0.55C4.73,20.99,4.86,21,5,21h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M11,14.17l-1.41,1.42L6,12 l3.59-3.59L11,9.83L8.83,12L11,14.17z M12,4.25c-0.41,0-0.75-0.34-0.75-0.75S11.59,2.75,12,2.75s0.75,0.34,0.75,0.75 S12.41,4.25,12,4.25z M14.41,15.59L13,14.17L15.17,12L13,9.83l1.41-1.42L18,12L14.41,15.59z" />
+      </g>
+    </Svg>
+  ),
 };
diff --git a/wax-prosemirror-services/src/CodeBlockService/CodeBlockTool.js b/wax-prosemirror-services/src/CodeBlockService/CodeBlockTool.js
index 49bba48d5..f490f7623 100644
--- a/wax-prosemirror-services/src/CodeBlockService/CodeBlockTool.js
+++ b/wax-prosemirror-services/src/CodeBlockService/CodeBlockTool.js
@@ -1,12 +1,11 @@
 import { injectable } from 'inversify';
-import { icons } from 'wax-prosemirror-components';
 import { setBlockType } from 'prosemirror-commands';
 import Tools from '../lib/Tools';
 
 @injectable()
 class CodeBlockTool extends Tools {
   title = 'Insert Code Block';
-  content = icons.code_block;
+  icon = 'codeBlock';
   name = 'CodeBlockTool';
 
   get run() {
-- 
GitLab