From 298043e2acadef083ae63ec7261665808cccf413 Mon Sep 17 00:00:00 2001
From: Yannis Barlas <yannisbarlas@gmail.com>
Date: Tue, 29 Sep 2020 13:04:42 +0300
Subject: [PATCH] fix image select

---
 wax-prosemirror-components/src/components/ImageUpload.js | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/wax-prosemirror-components/src/components/ImageUpload.js b/wax-prosemirror-components/src/components/ImageUpload.js
index 532317292..48e78c931 100644
--- a/wax-prosemirror-components/src/components/ImageUpload.js
+++ b/wax-prosemirror-components/src/components/ImageUpload.js
@@ -6,10 +6,10 @@ import styled from 'styled-components';
 import MenuButton from '../ui/buttons/MenuButton';
 
 const UploadImage = styled.div`
-  opacity: ${props => (props.select ? 1 : 0.4)};
+  /* opacity: ${props => (props.select ? 1 : 0.4)};
   pointer-events: ${props => (props.select ? 'default' : 'none')};
   display: inline-flex;
-  padding: 0px 10px;
+  padding: 0px 10px; */
 
   input {
     display: none;
@@ -25,11 +25,11 @@ const ImageUpload = ({ item, fileUpload, view }) => {
   const handleMouseDown = () => inputRef.current.click();
 
   return (
-    <UploadImage select={item.select && item.select(view.state, activeViewId)}>
+    <UploadImage>
       <label htmlFor="file-upload">
         <MenuButton
           active={false}
-          disabled={false}
+          disabled={!(item.select && item.select(view.state, activeViewId))}
           iconName={item.icon}
           onMouseDown={handleMouseDown}
           title="Upload Image"
-- 
GitLab