Skip to content

Commit da49eeb

Browse files
committed
Add CSS styling and Material UI delete icon
1 parent 952a0d4 commit da49eeb

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

app/src/components/main/DeleteButton.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
import React from 'react';
1+
import React, { useState } from 'react';
22
import { DeleteButtons } from '../../interfaces/Interfaces';
33
import { useDispatch, useSelector } from 'react-redux';
44
import { deleteChild } from '../../redux/reducers/slice/appStateSlice';
55
import { RootState } from '../../redux/store';
66
import { emitEvent } from '../../helperFunctions/socket';
7+
import { Delete } from '@mui/icons-material';
78

89
function DeleteButton({ id, name, onClickHandler }: DeleteButtons) {
910
const contextParam = useSelector((store: RootState) => store.contextSlice);
@@ -37,7 +38,7 @@ function DeleteButton({ id, name, onClickHandler }: DeleteButtons) {
3738
deleteHTMLtype(id);
3839
}}
3940
>
40-
x
41+
<Delete className="deleteIcon" />
4142
</button>
4243
</div>
4344
);

app/src/public/styles/style.css

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -746,9 +746,14 @@ CANVAS WINDOW
746746
0px 2px 2px 0px rgb(0 0 0 / 14%), 0px 1px 5px 0px rgb(0 0 0 / 12%);
747747
}
748748

749-
.delete-button-empty:hover {
749+
.deleteIcon {
750+
font-size: 18px;
751+
color: #4a4a4a;
752+
cursor: pointer;
753+
}
754+
755+
.deleteIcon:hover {
750756
color: white;
751-
background-color: rgba(0, 100, 0, 0.4);
752757
}
753758

754759
.componentContainer {

0 commit comments

Comments
 (0)