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" ;
19
19
20
20
// import {HTMLelements,getSize} from "../utils/htmlElements.util";
21
21
22
22
class HTMLComponentPanel extends Component {
23
23
state = {
24
- HtmlComponentName : '' ,
24
+ HtmlComponentName : ""
25
25
} ;
26
26
27
- handleChange = ( event ) => {
27
+ handleChange = event => {
28
28
this . setState ( {
29
- HtmlComponentName : event . target . value ,
29
+ HtmlComponentName : event . target . value
30
30
} ) ;
31
31
} ;
32
32
33
- handleCreateHTMLChild = ( type ) => {
33
+ handleCreateHTMLChild = type => {
34
34
this . props . addChild ( { title : type , childType : type , HTMLInfo : { } } ) ;
35
35
} ;
36
36
@@ -50,67 +50,127 @@ class HTMLComponentPanel extends Component {
50
50
className = "htmlicons"
51
51
aria-label = "Image"
52
52
onClick = { ( ) => {
53
- this . handleCreateHTMLChild ( ' Image' ) ;
53
+ this . handleCreateHTMLChild ( " Image" ) ;
54
54
} }
55
55
>
56
- < ImageIcon style = { { color : ' #e0e0e0' } } />
56
+ < ImageIcon style = { { color : " #e0e0e0" } } />
57
57
</ IconButton >
58
+ < Chip
59
+ label = "Image"
60
+ className = { classes . chip }
61
+ variant = "outlined"
62
+ style = { {
63
+ color : "white" ,
64
+ borderColor : "#424242" ,
65
+ borderWidth : "0.5px"
66
+ } }
67
+ />
58
68
</ div >
59
69
</ Grid >
60
70
< Grid item xs = { 4 } >
61
71
< IconButton
62
72
className = "htmlicons"
63
73
aria-label = "Form"
64
74
onClick = { ( ) => {
65
- this . handleCreateHTMLChild ( ' Form' ) ;
75
+ this . handleCreateHTMLChild ( " Form" ) ;
66
76
} }
67
77
>
68
- < FormIcon style = { { color : ' #e0e0e0' } } />
78
+ < FormIcon style = { { color : " #e0e0e0" } } />
69
79
</ IconButton >
80
+ < Chip
81
+ label = "Form"
82
+ className = { classes . chip }
83
+ variant = "outlined"
84
+ style = { {
85
+ color : "white" ,
86
+ borderColor : "#424242" ,
87
+ borderWidth : "0.5px"
88
+ } }
89
+ />
70
90
</ Grid >
71
91
< Grid item xs = { 4 } >
72
92
< IconButton
73
93
className = "htmlicons"
74
94
aria-label = "Button"
75
95
onClick = { ( ) => {
76
- this . handleCreateHTMLChild ( ' Button' ) ;
96
+ this . handleCreateHTMLChild ( " Button" ) ;
77
97
} }
78
98
>
79
- < ButtonIcon style = { { color : ' #e0e0e0' } } />
99
+ < ButtonIcon style = { { color : " #e0e0e0" } } />
80
100
</ IconButton >
101
+ < Chip
102
+ label = "Button"
103
+ className = { classes . chip }
104
+ variant = "outlined"
105
+ style = { {
106
+ color : "white" ,
107
+ borderColor : "#424242" ,
108
+ borderWidth : "0.5px"
109
+ } }
110
+ />
81
111
</ Grid >
82
112
< Grid item xs = { 4 } >
83
113
< IconButton
84
114
className = "htmlicons"
85
115
aria-label = "Link"
86
116
onClick = { ( ) => {
87
- this . handleCreateHTMLChild ( ' Link' ) ;
117
+ this . handleCreateHTMLChild ( " Link" ) ;
88
118
} }
89
119
>
90
- < LinkIcon style = { { color : ' #e0e0e0' } } />
120
+ < LinkIcon style = { { color : " #e0e0e0" } } />
91
121
</ IconButton >
122
+ < Chip
123
+ label = "Link"
124
+ className = { classes . chip }
125
+ variant = "outlined"
126
+ style = { {
127
+ color : "white" ,
128
+ borderColor : "#424242" ,
129
+ borderWidth : "0.5px"
130
+ } }
131
+ />
92
132
</ Grid >
93
133
< Grid item xs = { 4 } >
94
134
< IconButton
95
135
className = "htmlicons"
96
136
aria-label = "List"
97
137
onClick = { ( ) => {
98
- this . handleCreateHTMLChild ( ' List' ) ;
138
+ this . handleCreateHTMLChild ( " List" ) ;
99
139
} }
100
140
>
101
- < ListIcon style = { { color : ' #e0e0e0' } } />
141
+ < ListIcon style = { { color : " #e0e0e0" } } />
102
142
</ IconButton >
143
+ < Chip
144
+ label = "List"
145
+ className = { classes . chip }
146
+ variant = "outlined"
147
+ style = { {
148
+ color : "white" ,
149
+ borderColor : "#424242" ,
150
+ borderWidth : "0.5px"
151
+ } }
152
+ />
103
153
</ Grid >
104
154
< Grid item xs = { 4 } >
105
155
< IconButton
106
156
className = "htmlicons"
107
157
aria-label = "Paragraph"
108
158
onClick = { ( ) => {
109
- this . handleCreateHTMLChild ( ' Paragraph' ) ;
159
+ this . handleCreateHTMLChild ( " Paragraph" ) ;
110
160
} }
111
161
>
112
- < ParagraphIcon style = { { color : ' #e0e0e0' } } />
162
+ < ParagraphIcon style = { { color : " #e0e0e0" } } />
113
163
</ IconButton >
164
+ < Chip
165
+ label = "Paragraph"
166
+ className = { classes . chip }
167
+ variant = "outlined"
168
+ style = { {
169
+ color : "white" ,
170
+ borderColor : "#424242" ,
171
+ borderWidth : "0.5px"
172
+ } }
173
+ />
114
174
</ Grid >
115
175
</ Grid >
116
176
</ Paper >
@@ -121,32 +181,34 @@ class HTMLComponentPanel extends Component {
121
181
function styles ( theme ) {
122
182
return {
123
183
htmlPanel : {
124
- width : '100%' ,
125
- height : '30%' ,
126
- // backgroundColor: "#333333",
127
- borderStyle : 'solid' ,
128
- borderWidth : '0.5px' ,
129
- borderRadius : '1px' ,
130
- borderColor : '#424242' ,
131
- bottom : '0px' ,
132
- padding : '20px' ,
184
+ width : "100%" ,
185
+ height : "30%" ,
186
+ backgroundColor : "#212121" ,
187
+ borderStyle : "solid" ,
188
+ borderWidth : "0.5px" ,
189
+ borderRadius : "1px" ,
190
+ borderColor : "#424242" ,
191
+ bottom : "0px" ,
192
+ padding : "10px" ,
193
+ boxShadow : "0 6px 6px rgba(0,0,0,0.23)"
194
+ // paddingBottom: "10px"
133
195
} ,
134
196
chip : {
135
- color : ' rgba(193, 66, 66, 0)' ,
197
+ color : " rgba(193, 66, 66, 0)"
136
198
} ,
137
199
htmliconwrapper : {
138
- verticalAlign : ' baseline' ,
200
+ verticalAlign : " baseline"
139
201
} ,
140
202
htmlicons : {
141
- color : ' #ffffff' ,
203
+ color : " #ffffff"
142
204
} ,
143
205
tabRoot : {
144
- textTransform : ' initial' ,
206
+ textTransform : " initial" ,
145
207
minWidth : 100 ,
146
208
fontWeight : theme . typography . fontWeightRegular ,
147
209
// marginRight: theme.spacing.unit * 4,
148
- color : ' #ffffff' ,
149
- } ,
210
+ color : " #ffffff"
211
+ }
150
212
} ;
151
213
}
152
214
0 commit comments