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 theme from "../components/theme.ts" ;
14
- import Typography from " @material-ui/core/Typography" ;
15
- import Grid from " @material-ui/core/Grid" ;
16
- import Paper from " @material-ui/core/Paper" ;
17
- import Tab from " @material-ui/core/Tab" ;
18
- import Chip from "@material-ui/core/Chip" ;
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
- // test
23
-
24
22
class HTMLComponentPanel extends Component {
25
23
state = {
26
- HtmlComponentName : ""
24
+ HtmlComponentName : '' ,
27
25
} ;
28
26
29
- handleChange = event => {
27
+ handleChange = ( event ) => {
30
28
this . setState ( {
31
- HtmlComponentName : event . target . value
29
+ HtmlComponentName : event . target . value ,
32
30
} ) ;
33
31
} ;
34
32
35
- handleCreateHTMLChild = type => {
33
+ handleCreateHTMLChild = ( type ) => {
36
34
this . props . addChild ( { title : type , childType : type , HTMLInfo : { } } ) ;
37
35
} ;
38
36
@@ -52,61 +50,66 @@ class HTMLComponentPanel extends Component {
52
50
className = "htmlicons"
53
51
aria-label = "Image"
54
52
onClick = { ( ) => {
55
- this . handleCreateHTMLChild ( " Image" ) ;
53
+ this . handleCreateHTMLChild ( ' Image' ) ;
56
54
} }
57
55
>
58
- < ImageIcon style = { { color : " #e0e0e0" } } />
56
+ < ImageIcon style = { { color : ' #e0e0e0' } } />
59
57
</ IconButton >
60
58
</ div >
61
59
</ Grid >
62
60
< Grid item xs = { 4 } >
63
61
< IconButton
62
+ className = "htmlicons"
64
63
aria-label = "Form"
65
64
onClick = { ( ) => {
66
- this . handleCreateHTMLChild ( " Form" ) ;
65
+ this . handleCreateHTMLChild ( ' Form' ) ;
67
66
} }
68
67
>
69
- < FormIcon />
68
+ < FormIcon style = { { color : '#e0e0e0' } } />
70
69
</ IconButton >
71
70
</ Grid >
72
71
< Grid item xs = { 4 } >
73
72
< IconButton
73
+ className = "htmlicons"
74
74
aria-label = "Button"
75
75
onClick = { ( ) => {
76
- this . handleCreateHTMLChild ( " Button" ) ;
76
+ this . handleCreateHTMLChild ( ' Button' ) ;
77
77
} }
78
78
>
79
- < ButtonIcon />
79
+ < ButtonIcon style = { { color : '#e0e0e0' } } />
80
80
</ IconButton >
81
81
</ Grid >
82
82
< Grid item xs = { 4 } >
83
83
< IconButton
84
+ className = "htmlicons"
84
85
aria-label = "Link"
85
86
onClick = { ( ) => {
86
- this . handleCreateHTMLChild ( " Link" ) ;
87
+ this . handleCreateHTMLChild ( ' Link' ) ;
87
88
} }
88
89
>
89
- < LinkIcon />
90
+ < LinkIcon style = { { color : '#e0e0e0' } } />
90
91
</ IconButton >
91
92
</ Grid >
92
93
< Grid item xs = { 4 } >
93
94
< IconButton
95
+ className = "htmlicons"
94
96
aria-label = "List"
95
97
onClick = { ( ) => {
96
- this . handleCreateHTMLChild ( " List" ) ;
98
+ this . handleCreateHTMLChild ( ' List' ) ;
97
99
} }
98
100
>
99
- < ListIcon />
101
+ < ListIcon style = { { color : '#e0e0e0' } } />
100
102
</ IconButton >
101
103
</ Grid >
102
104
< Grid item xs = { 4 } >
103
105
< IconButton
106
+ className = "htmlicons"
104
107
aria-label = "Paragraph"
105
108
onClick = { ( ) => {
106
- this . handleCreateHTMLChild ( " Paragraph" ) ;
109
+ this . handleCreateHTMLChild ( ' Paragraph' ) ;
107
110
} }
108
111
>
109
- < ParagraphIcon />
112
+ < ParagraphIcon style = { { color : '#e0e0e0' } } />
110
113
</ IconButton >
111
114
</ Grid >
112
115
</ Grid >
@@ -118,32 +121,32 @@ class HTMLComponentPanel extends Component {
118
121
function styles ( theme ) {
119
122
return {
120
123
htmlPanel : {
121
- width : " 100%" ,
122
- height : " 30%" ,
124
+ width : ' 100%' ,
125
+ height : ' 30%' ,
123
126
// backgroundColor: "#333333",
124
- borderStyle : " solid" ,
125
- borderWidth : " 0.5px" ,
126
- borderRadius : " 1px" ,
127
- borderColor : " #424242" ,
128
- bottom : " 0px" ,
129
- padding : " 20px"
127
+ borderStyle : ' solid' ,
128
+ borderWidth : ' 0.5px' ,
129
+ borderRadius : ' 1px' ,
130
+ borderColor : ' #424242' ,
131
+ bottom : ' 0px' ,
132
+ padding : ' 20px' ,
130
133
} ,
131
134
chip : {
132
- color : " rgba(193, 66, 66, 0)"
135
+ color : ' rgba(193, 66, 66, 0)' ,
133
136
} ,
134
137
htmliconwrapper : {
135
- verticalAlign : " baseline"
138
+ verticalAlign : ' baseline' ,
136
139
} ,
137
140
htmlicons : {
138
- color : " #ffffff"
141
+ color : ' #ffffff' ,
139
142
} ,
140
143
tabRoot : {
141
- textTransform : " initial" ,
144
+ textTransform : ' initial' ,
142
145
minWidth : 100 ,
143
146
fontWeight : theme . typography . fontWeightRegular ,
144
147
// marginRight: theme.spacing.unit * 4,
145
- color : " #ffffff"
146
- }
148
+ color : ' #ffffff' ,
149
+ } ,
147
150
} ;
148
151
}
149
152
0 commit comments