Skip to content

Commit 068412b

Browse files
add as child hover
1 parent d0f1c05 commit 068412b

File tree

3 files changed

+29
-35
lines changed

3 files changed

+29
-35
lines changed

src/components/KonvaStage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ class KonvaStage extends Component {
207207
handleTransform={handleTransform}
208208
draggable={true}
209209
blockSnapSize={this.state.blockSnapSize}
210-
imageSource={child.htmlElement == 'Image' && child.HTMLInfo.Src ? child.HTMLInfo.Src : null}
210+
imageSource={child.htmlElement === 'Image' && child.HTMLInfo.Src ? child.HTMLInfo.Src : null}
211211
/>
212212
))
213213
.sort((rectA, rectB) => {

src/components/LeftColExpansionPanel.jsx

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import Grid from '@material-ui/core/Grid';
99
import AddIcon from '@material-ui/icons/Add';
1010
import DeleteIcon from '@material-ui/icons/Delete';
1111
import Button from '@material-ui/core/Button';
12+
import Tooltip from '@material-ui/core/Tooltip';
1213

1314
const LeftColExpansionPanel = props => {
1415
const {
@@ -118,14 +119,16 @@ const LeftColExpansionPanel = props => {
118119
{id === 1 || isFocused() || !selectableChildren.includes(id) ? (
119120
<div />
120121
) : (
121-
<IconButton
122-
aria-label="Add"
123-
onClick={() => {
124-
addChild({ title, childType: "COMP" });
125-
}}
126-
>
127-
<AddIcon style={{ color, float: "right" }} />
128-
</IconButton>
122+
<Tooltip title="add as child" aria-label="add as child" placement="left">
123+
<IconButton
124+
aria-label="Add"
125+
onClick={() => {
126+
addChild({ title, childType: 'COMP' });
127+
}}
128+
>
129+
<AddIcon style={{ color, float: 'right' }} />
130+
</IconButton>
131+
</Tooltip>
129132
)}
130133
</Grid>
131134
</div>

src/components/MainContainerHeader.jsx

Lines changed: 17 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const styles = () => ({
4646
},
4747
});
4848

49-
const MainContainerHeader = (props) => {
49+
const MainContainerHeader = props => {
5050
const {
5151
classes,
5252
image,
@@ -63,12 +63,7 @@ const MainContainerHeader = (props) => {
6363
<div className="main-header-buttons">
6464
<Tooltip title="remove image">
6565
<div>
66-
<Button
67-
disabled={!image}
68-
color="default"
69-
className={classes.button}
70-
onClick={showImageDeleteModal}
71-
>
66+
<Button disabled={!image} color="default" className={classes.button} onClick={showImageDeleteModal}>
7267
<DeleteOutlineIcon className={classes.light} />
7368
</Button>
7469
</div>
@@ -79,25 +74,21 @@ const MainContainerHeader = (props) => {
7974
<ImageSearchIcon className={classes.light} />
8075
</Button>
8176
</div>
82-
</Tooltip>
83-
<Tooltip title={'export'}>
84-
<div>
85-
<Button
86-
color="primary"
87-
variant="text"
88-
// variant="outlined"
89-
className={classes.clearButton}
90-
disabled={totalComponents < 1}
91-
onClick={showGenerateAppModal}
92-
>
93-
<GetAppIcon
94-
className={classes.light}
95-
style={{ paddingLeft: '5px', paddingRight: '5px' }}
96-
/>
97-
Export Project
98-
</Button>
99-
</div>
100-
</Tooltip>
77+
</Tooltip>{' '}
78+
*/}
79+
<div>
80+
<Button
81+
color="primary"
82+
variant="text"
83+
// variant="outlined"
84+
className={classes.clearButton}
85+
disabled={totalComponents < 1}
86+
onClick={showGenerateAppModal}
87+
>
88+
<GetAppIcon className={classes.light} style={{ paddingLeft: '5px', paddingRight: '5px' }} />
89+
Export Project
90+
</Button>
91+
</div>
10192
</div>
10293
</div>
10394
);

0 commit comments

Comments
 (0)