Skip to content

Commit 81d8d0b

Browse files
ts updates on redux files
2 parents 71b1e9d + da15ca7 commit 81d8d0b

File tree

8 files changed

+187
-183
lines changed

8 files changed

+187
-183
lines changed

src/components/HTMLComponentPanel.jsx

Lines changed: 92 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,41 @@
1-
import React, { Component } from "react";
2-
import { connect } from "react-redux";
3-
import { compose } from "redux";
4-
import { withStyles } from "@material-ui/core/styles";
5-
import TextField from "@material-ui/core/TextField";
6-
import IconButton from "@material-ui/core/IconButton";
7-
import ImageIcon from "@material-ui/icons/Image";
8-
import FormIcon from "@material-ui/icons/Description";
9-
import ButtonIcon from "@material-ui/icons/EditAttributes";
10-
import LinkIcon from "@material-ui/icons/Link";
11-
import ListIcon from "@material-ui/icons/List";
12-
import ParagraphIcon from "@material-ui/icons/LocalParking";
13-
import Typography from "@material-ui/core/Typography";
14-
import Grid from "@material-ui/core/Grid";
15-
import Paper from "@material-ui/core/Paper";
16-
import Tab from "@material-ui/core/Tab";
17-
import Chip from "@material-ui/core/Chip";
18-
import theme from "./theme.ts";
1+
import React, { Component } from 'react';
2+
import { connect } from 'react-redux';
3+
import { compose } from 'redux';
4+
import { withStyles } from '@material-ui/core/styles';
5+
import TextField from '@material-ui/core/TextField';
6+
import IconButton from '@material-ui/core/IconButton';
7+
import ImageIcon from '@material-ui/icons/Image';
8+
import FormIcon from '@material-ui/icons/Description';
9+
import ButtonIcon from '@material-ui/icons/EditAttributes';
10+
import LinkIcon from '@material-ui/icons/Link';
11+
import ListIcon from '@material-ui/icons/List';
12+
import ParagraphIcon from '@material-ui/icons/LocalParking';
13+
import Typography from '@material-ui/core/Typography';
14+
import Grid from '@material-ui/core/Grid';
15+
import Paper from '@material-ui/core/Paper';
16+
import Tab from '@material-ui/core/Tab';
17+
import Chip from '@material-ui/core/Chip';
18+
import theme from './theme.ts';
1919

2020
class HTMLComponentPanel extends Component {
2121
state = {
22-
HtmlComponentName: ""
22+
HtmlComponentName: '',
2323
};
2424

25-
handleChange = event => {
25+
handleChange = (event) => {
2626
this.setState({
27-
HtmlComponentName: event.target.value
27+
HtmlComponentName: event.target.value,
2828
});
2929
};
3030

31-
handleCreateHTMLChild = type => {
31+
handleCreateHTMLChild = (type) => {
3232
this.props.addChild({ title: type, childType: type, HTMLInfo: {} });
3333
};
3434

3535
render() {
3636
const { addChild } = this.props;
3737
return (
38-
<div className={classes.htmlPanel}>
38+
<div className={'htmlPanel'} alignItems="flex-start" align="center">
3939
<Tab
4040
disableRipple
4141
classes={{ root: classes.tabRoot, selected: classes.tabSelected }}
@@ -48,12 +48,16 @@ class HTMLComponentPanel extends Component {
4848
className="htmlicons"
4949
aria-label="Image"
5050
onClick={() => {
51-
this.handleCreateHTMLChild("Image");
51+
this.handleCreateHTMLChild('Image');
52+
}}
53+
style={{
54+
margin: 0,
55+
padding: 0,
5256
}}
5357
>
5458
<ImageIcon
5559
style={{
56-
color: "#e0e0e0"
60+
color: '#e0e0e0',
5761
}}
5862
/>
5963
</IconButton>
@@ -62,10 +66,10 @@ class HTMLComponentPanel extends Component {
6266
className={classes.chip}
6367
variant="outlined"
6468
style={{
65-
color: "white",
66-
borderColor: "#424242",
67-
borderWidth: "0.0px",
68-
fontSize: "50%"
69+
color: 'white',
70+
fontSize: '50%',
71+
margin: 0,
72+
padding: 0,
6973
}}
7074
/>
7175
</div>
@@ -75,20 +79,22 @@ class HTMLComponentPanel extends Component {
7579
className="htmlicons"
7680
aria-label="Form"
7781
onClick={() => {
78-
this.handleCreateHTMLChild("Form");
82+
this.handleCreateHTMLChild('Form');
83+
}}
84+
style={{
85+
margin: 0,
86+
padding: 0,
7987
}}
8088
>
81-
<FormIcon style={{ color: "#e0e0e0" }} />
89+
<FormIcon style={{ color: '#e0e0e0' }} />
8290
</IconButton>
8391
<Chip
8492
label="Form"
8593
className={classes.chip}
8694
variant="outlined"
8795
style={{
88-
color: "white",
89-
borderColor: "#424242",
90-
borderWidth: "0.0px",
91-
fontSize: "50%"
96+
color: 'white',
97+
fontSize: '50%',
9298
}}
9399
/>
94100
</Grid>
@@ -97,20 +103,22 @@ class HTMLComponentPanel extends Component {
97103
className="htmlicons"
98104
aria-label="Button"
99105
onClick={() => {
100-
this.handleCreateHTMLChild("Button");
106+
this.handleCreateHTMLChild('Button');
107+
}}
108+
style={{
109+
margin: 0,
110+
padding: 0,
101111
}}
102112
>
103-
<ButtonIcon style={{ color: "#e0e0e0" }} />
113+
<ButtonIcon style={{ color: '#e0e0e0' }} />
104114
</IconButton>
105115
<Chip
106116
label="Button"
107117
className={classes.chip}
108118
variant="outlined"
109119
style={{
110-
color: "white",
111-
borderColor: "#424242",
112-
borderWidth: "0.0px",
113-
fontSize: "50%"
120+
color: 'white',
121+
fontSize: '50%',
114122
}}
115123
/>
116124
</Grid>
@@ -119,20 +127,22 @@ class HTMLComponentPanel extends Component {
119127
className="htmlicons"
120128
aria-label="Link"
121129
onClick={() => {
122-
this.handleCreateHTMLChild("Link");
130+
this.handleCreateHTMLChild('Link');
131+
}}
132+
style={{
133+
margin: 0,
134+
padding: 0,
123135
}}
124136
>
125-
<LinkIcon style={{ color: "#e0e0e0" }} />
137+
<LinkIcon style={{ color: '#e0e0e0' }} />
126138
</IconButton>
127139
<Chip
128140
label="Link"
129141
className={classes.chip}
130142
variant="outlined"
131143
style={{
132-
color: "white",
133-
borderColor: "#424242",
134-
borderWidth: "0.0px",
135-
fontSize: "50%"
144+
color: 'white',
145+
fontSize: '50%',
136146
}}
137147
/>
138148
</Grid>
@@ -141,20 +151,22 @@ class HTMLComponentPanel extends Component {
141151
className="htmlicons"
142152
aria-label="List"
143153
onClick={() => {
144-
this.handleCreateHTMLChild("List");
154+
this.handleCreateHTMLChild('List');
155+
}}
156+
style={{
157+
margin: 0,
158+
padding: 0,
145159
}}
146160
>
147-
<ListIcon style={{ color: "#e0e0e0" }} />
161+
<ListIcon style={{ color: '#e0e0e0' }} />
148162
</IconButton>
149163
<Chip
150164
label="List"
151165
className={classes.chip}
152166
variant="outlined"
153167
style={{
154-
color: "white",
155-
borderColor: "#424242",
156-
borderWidth: "0.0px",
157-
fontSize: "50%"
168+
color: 'white',
169+
fontSize: '50%',
158170
}}
159171
/>
160172
</Grid>
@@ -163,20 +175,22 @@ class HTMLComponentPanel extends Component {
163175
className="htmlicons"
164176
aria-label="Paragraph"
165177
onClick={() => {
166-
this.handleCreateHTMLChild("Paragraph");
178+
this.handleCreateHTMLChild('Paragraph');
179+
}}
180+
style={{
181+
margin: 0,
182+
padding: 0,
167183
}}
168184
>
169-
<ParagraphIcon style={{ color: "#e0e0e0" }} />
185+
<ParagraphIcon style={{ color: '#e0e0e0' }} />
170186
</IconButton>
171187
<Chip
172188
label="Paragraph"
173189
className={classes.chip}
174190
variant="outlined"
175191
style={{
176-
color: "white",
177-
borderColor: "#424242",
178-
borderWidth: "0.0px",
179-
fontSize: "50%"
192+
color: 'white',
193+
fontSize: '50%',
180194
}}
181195
/>
182196
</Grid>
@@ -189,37 +203,37 @@ class HTMLComponentPanel extends Component {
189203
function styles(theme) {
190204
return {
191205
htmlPanel: {
192-
width: "100%",
193-
height: "30%",
194-
backgroundColor: "#212121",
195-
borderStyle: "solid",
196-
borderWidth: "0.5px",
197-
borderRadius: "1px",
198-
borderColor: "#424242",
199-
bottom: "0px",
200-
paddingLeft: "10px",
201-
paddingRight: "10px",
202-
paddingBottom: "25px",
203-
paddingTop: "2px",
204-
boxShadow: "0 6px 6px rgba(0,0,0,0.23)"
206+
width: '100%',
207+
height: '30%',
208+
backgroundColor: '#212121',
209+
borderStyle: 'solid',
210+
borderWidth: '0.5px',
211+
borderRadius: '1px',
212+
borderColor: '#424242',
213+
bottom: '0px',
214+
paddingLeft: '10px',
215+
paddingRight: '10px',
216+
paddingBottom: '25px',
217+
paddingTop: '2px',
218+
boxShadow: '0 6px 6px rgba(0,0,0,0.23)',
205219
// paddingBottom: "10px"
206220
},
207221
chip: {
208-
color: "rgba(193, 66, 66, 0)"
222+
color: 'rgba(193, 66, 66, 0)',
209223
},
210224
htmliconwrapper: {
211-
verticalAlign: "baseline"
225+
verticalAlign: 'baseline',
212226
},
213227
htmlicons: {
214-
color: "#ffffff"
228+
color: '#ffffff',
215229
},
216230
tabRoot: {
217-
textTransform: "initial",
231+
textTransform: 'initial',
218232
minWidth: 100,
219233
fontWeight: theme.typography.fontWeightRegular,
220234
// marginRight: theme.spacing.unit * 4,
221-
color: "#ffffff"
222-
}
235+
color: '#ffffff',
236+
},
223237
};
224238
}
225239

0 commit comments

Comments
 (0)