Skip to content
Snippets Groups Projects
Commit 246cec9e authored by chris's avatar chris
Browse files

style fix

parent a469afd1
No related branches found
No related tags found
1 merge request!161Connect ui
...@@ -20,7 +20,7 @@ const ButtonStyled = styled.button` ...@@ -20,7 +20,7 @@ const ButtonStyled = styled.button`
`; `;
const InsertTableToolContainer = styled.div` const InsertTableToolContainer = styled.div`
top: 50px; top: 53px;
position: absolute; position: absolute;
height: auto; height: auto;
width: 167px; width: 167px;
...@@ -37,22 +37,17 @@ const CreateTable = ({ view = {}, item }) => { ...@@ -37,22 +37,17 @@ const CreateTable = ({ view = {}, item }) => {
} }
const { state, dispatch } = view; const { state, dispatch } = view;
const [isTableToolDisplayed, setTableToolDisplay] = useState(false); const [isTableToolDisplayed, setTableToolDisplay] = useState(false);
const showHideTable = () => {
setTableToolDisplay(!isTableToolDisplayed);
};
const CreateButton = ( const CreateButton = (
<ButtonStyled <ButtonStyled
type="button" type="button"
isActive={item.active && item.active(view.state)} isActive={isTableToolDisplayed}
title={item.title} title={item.title}
disabled={item.enable && !item.enable(view.state)} disabled={item.enable && !item.enable(view.state)}
onMouseDown={e => { onMouseDown={e => {
e.preventDefault(); e.preventDefault();
showHideTable(); setTableToolDisplay(!isTableToolDisplayed);
}} }}
select={item.select && item.select(view.state, activeViewId)} select={item.select && item.select(view.state, activeViewId)}
> >
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment