Skip to content

Commit d261cb8

Browse files
committed
added icons to buttons
1 parent 0960757 commit d261cb8

File tree

3 files changed

+41
-21
lines changed

3 files changed

+41
-21
lines changed

app/src/components/left/HTMLItem.tsx

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useState } from 'react';
1+
import React, { ComponentType, ReactElement, useState } from 'react';
22

33
import Grid from '@mui/material/Grid';
44
import { ItemTypes } from '../../constants/ItemTypes';
@@ -10,6 +10,8 @@ import createModal from '../right/createModal';
1010
import makeStyles from '@mui/styles/makeStyles';
1111
import { useDrag } from 'react-dnd';
1212
// import { useSelector } from 'react-redux';
13+
import { IconProps } from '@mui/material';
14+
import CodeIcon from '@mui/icons-material/Code';
1315

1416
const useStyles = makeStyles({
1517
HTMLPanelItem: {
@@ -41,7 +43,7 @@ const HTMLItem: React.FC<{
4143
id: number;
4244
Icon: any;
4345
handleDelete: (id: number) => void;
44-
}> = ({ name, id, handleDelete }) => {
46+
}> = ({ name, id, Icon, handleDelete }) => {
4547
const classes = useStyles();
4648
const [modal, setModal] = useState(null);
4749
const [{ isDragging }, drag] = useDrag({
@@ -51,6 +53,7 @@ const HTMLItem: React.FC<{
5153
newInstance: true,
5254
instanceType: 'HTML Element',
5355
name,
56+
Icon,
5457
instanceTypeId: id
5558
},
5659
collect: (monitor: any) => ({
@@ -127,7 +130,10 @@ const HTMLItem: React.FC<{
127130
className={`${classes.HTMLPanelItem} ${classes.darkThemeFontColor}`}
128131
id="HTMLItem"
129132
>
130-
<h3>{name}</h3>
133+
<a>
134+
<Icon fontSize="small" align-items="center" />
135+
{name}
136+
</a>
131137
</div>
132138
)}
133139
{id > 20 && (
@@ -138,7 +144,10 @@ const HTMLItem: React.FC<{
138144
className={`${classes.HTMLPanelItem} ${classes.darkThemeFontColor}`}
139145
id="HTMLItem"
140146
>
141-
<h3>{name}</h3>
147+
<h3>
148+
<CodeIcon fontSize="small" align-items="center" />
149+
{name}
150+
</h3>
142151
</div>
143152
<button
144153
id="newElement"

app/src/containers/CustomizationPanel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1031,7 +1031,7 @@ const useStyles = makeStyles({
10311031
backgroundColor: 'rgba(0, 0, 0, 0.2)'
10321032
},
10331033
saveButtonDark: {
1034-
border: '1px solid #3F51B5'
1034+
border: '1px solid #1b544b'
10351035
},
10361036
compName: {
10371037
fontSize: '1rem'

app/src/redux/HTMLTypes.ts

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,21 @@
11
import ImageIcon from '@mui/icons-material/Image';
2-
import ParagraphIcon from '@mui/icons-material/LocalParking';
2+
import NotesOutlinedIcon from '@mui/icons-material/NotesOutlined';
33
import FormIcon from '@mui/icons-material/Description';
44
import HeaderIcon from '@mui/icons-material/TextFormat';
5+
import CodeIcon from '@mui/icons-material/Code';
56
import ButtonIcon from '@mui/icons-material/EditAttributes';
7+
import ToggleOffOutlinedIcon from '@mui/icons-material/ToggleOffOutlined';
68
import LinkIcon from '@mui/icons-material/Link';
7-
import ListIcon from '@mui/icons-material/List';
9+
import FormatListBulletedOutlinedIcon from '@mui/icons-material/FormatListBulletedOutlined';
10+
import EditOutlinedIcon from '@mui/icons-material/EditOutlined';
11+
import FormatListNumberedOutlinedIcon from '@mui/icons-material/FormatListNumberedOutlined';
12+
import FeaturedPlayListOutlinedIcon from '@mui/icons-material/FeaturedPlayListOutlined';
13+
import ListAltOutlinedIcon from '@mui/icons-material/ListAltOutlined';
14+
import RouteOutlinedIcon from '@mui/icons-material/RouteOutlined';
15+
import DatasetLinkedOutlinedIcon from '@mui/icons-material/DatasetLinkedOutlined';
16+
import ShortTextOutlinedIcon from '@mui/icons-material/ShortTextOutlined';
17+
import MoreOutlinedIcon from '@mui/icons-material/MoreOutlined';
18+
819
import {
920
HTMLType
1021
} from '../interfaces/Interfaces';
@@ -19,7 +30,7 @@ const HTMLTypes: HTMLType[] = [
1930
style: {},
2031
placeHolderShort: 'div',
2132
placeHolderLong: '',
22-
// icon: HeaderIcon,
33+
icon: CodeIcon,
2334
framework: 'reactClassic',
2435
nestable: true,
2536
},
@@ -87,7 +98,7 @@ const HTMLTypes: HTMLType[] = [
8798
style: {},
8899
placeHolderShort: 'paragraph',
89100
placeHolderLong: '',
90-
icon: ParagraphIcon,
101+
icon: NotesOutlinedIcon,
91102
framework: 'reactClassic',
92103
nestable: false,
93104
},
@@ -120,7 +131,7 @@ const HTMLTypes: HTMLType[] = [
120131
style: {},
121132
placeHolderShort: 'span',
122133
placeHolderLong: '',
123-
icon: HeaderIcon,
134+
icon: ShortTextOutlinedIcon,
124135
framework: 'reactClassic',
125136
nestable: false,
126137
},
@@ -131,7 +142,7 @@ const HTMLTypes: HTMLType[] = [
131142
style: {},
132143
placeHolderShort: 'input',
133144
placeHolderLong: '',
134-
icon: HeaderIcon,
145+
icon: EditOutlinedIcon,
135146
framework: 'reactClassic',
136147
nestable: false,
137148
},
@@ -142,7 +153,7 @@ const HTMLTypes: HTMLType[] = [
142153
style: {},
143154
placeHolderShort: 'label',
144155
placeHolderLong: '',
145-
icon: HeaderIcon,
156+
icon: MoreOutlinedIcon,
146157
framework: 'reactClassic',
147158
nestable: false,
148159
},
@@ -153,7 +164,7 @@ const HTMLTypes: HTMLType[] = [
153164
style: {},
154165
placeHolderShort: 'ordered list',
155166
placeHolderLong: '',
156-
icon: ListIcon,
167+
icon: FormatListNumberedOutlinedIcon,
157168
framework: 'reactClassic',
158169
nestable: true,
159170
},
@@ -164,7 +175,7 @@ const HTMLTypes: HTMLType[] = [
164175
style: {},
165176
placeHolderShort: 'unordered list',
166177
placeHolderLong: '',
167-
icon: ListIcon,
178+
icon: FormatListBulletedOutlinedIcon,
168179
framework: 'reactClassic',
169180
nestable: true,
170181
},
@@ -175,7 +186,7 @@ const HTMLTypes: HTMLType[] = [
175186
style: {},
176187
placeHolderShort: 'menu',
177188
placeHolderLong: '',
178-
icon: ListIcon,
189+
icon: FeaturedPlayListOutlinedIcon,
179190
framework: 'reactClassic',
180191
nestable: true,
181192
},
@@ -186,7 +197,7 @@ const HTMLTypes: HTMLType[] = [
186197
style: {},
187198
placeHolderShort: 'list item',
188199
placeHolderLong: '',
189-
icon: ListIcon,
200+
icon: ListAltOutlinedIcon,
190201
framework: 'reactClassic',
191202
nestable: true,
192203
},
@@ -197,7 +208,7 @@ const HTMLTypes: HTMLType[] = [
197208
style: {},
198209
placeHolderShort: 'Switch',
199210
placeHolderLong: '',
200-
icon: ListIcon,
211+
icon: ToggleOffOutlinedIcon,
201212
framework: 'reactClassic',
202213
nestable: true,
203214
},
@@ -208,7 +219,7 @@ const HTMLTypes: HTMLType[] = [
208219
style: {},
209220
placeHolderShort: 'Route',
210221
placeHolderLong: '',
211-
icon: LinkIcon,
222+
icon: RouteOutlinedIcon,
212223
framework: 'reactClassic',
213224
nestable: true,
214225
},
@@ -219,7 +230,7 @@ const HTMLTypes: HTMLType[] = [
219230
style: {},
220231
placeHolderShort: 'LinkTo',
221232
placeHolderLong: '',
222-
icon: ListIcon,
233+
icon: DatasetLinkedOutlinedIcon,
223234
framework: 'reactClassic',
224235
nestable: true,
225236
},
@@ -230,7 +241,7 @@ const HTMLTypes: HTMLType[] = [
230241
style: {},
231242
placeHolderShort: 'LinkHref',
232243
placeHolderLong: '',
233-
icon: ListIcon,
244+
icon: LinkIcon,
234245
framework: 'nextjs',
235246
nestable: true,
236247
},
@@ -241,7 +252,7 @@ const HTMLTypes: HTMLType[] = [
241252
style: {},
242253
placeHolderShort: 'Image',
243254
placeHolderLong: '',
244-
icon: ListIcon,
255+
icon: ImageIcon,
245256
framework: 'nextjs',
246257
nestable: false,
247258
},

0 commit comments

Comments
 (0)