Skip to content

Commit 9018403

Browse files
Merge pull request #91 from ChristianEdwardPadilla/development
styling generally
2 parents da15ca7 + cc5c2fe commit 9018403

File tree

10 files changed

+292
-266
lines changed

10 files changed

+292
-266
lines changed

src/components/BottomTabs.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,13 +162,13 @@ class BottomTabs extends Component {
162162
<Tab
163163
disableRipple
164164
classes={{ root: classes.tabRoot, selected: classes.tabSelected }}
165-
label="Component State"
165+
label={`HTML Element Attributes ${htmlAttribCount ? `(${htmlAttribCount})` : ''} `}
166166
/>
167-
<Tab
167+
{/* <Tab
168168
disableRipple
169169
classes={{ root: classes.tabRoot, selected: classes.tabSelected }}
170-
label={`HTML Element Attributes ${htmlAttribCount ? `(${htmlAttribCount})` : ''} `}
171-
/>
170+
label="Component State"
171+
/> */}
172172
</Tabs>
173173

174174
{value === 0 && (

src/components/HTMLComponentPanel.jsx

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ class HTMLComponentPanel extends Component {
3333
};
3434

3535
render() {
36-
const { addChild } = this.props;
36+
const { classes } = this.props;
3737
return (
38-
<div className={'htmlPanel'} alignItems="flex-start" align="center">
38+
<div align="center">
3939
<Tab
4040
disableRipple
4141
classes={{ root: classes.tabRoot, selected: classes.tabSelected }}
@@ -67,7 +67,7 @@ class HTMLComponentPanel extends Component {
6767
variant="outlined"
6868
style={{
6969
color: 'white',
70-
fontSize: '50%',
70+
fontSize: '80%',
7171
margin: 0,
7272
padding: 0,
7373
}}
@@ -94,7 +94,7 @@ class HTMLComponentPanel extends Component {
9494
variant="outlined"
9595
style={{
9696
color: 'white',
97-
fontSize: '50%',
97+
fontSize: '80%',
9898
}}
9999
/>
100100
</Grid>
@@ -118,7 +118,7 @@ class HTMLComponentPanel extends Component {
118118
variant="outlined"
119119
style={{
120120
color: 'white',
121-
fontSize: '50%',
121+
fontSize: '80%',
122122
}}
123123
/>
124124
</Grid>
@@ -142,7 +142,7 @@ class HTMLComponentPanel extends Component {
142142
variant="outlined"
143143
style={{
144144
color: 'white',
145-
fontSize: '50%',
145+
fontSize: '80%',
146146
}}
147147
/>
148148
</Grid>
@@ -166,11 +166,18 @@ class HTMLComponentPanel extends Component {
166166
variant="outlined"
167167
style={{
168168
color: 'white',
169-
fontSize: '50%',
169+
fontSize: '80%',
170170
}}
171171
/>
172172
</Grid>
173-
<Grid item xs={4}>
173+
<Grid
174+
item
175+
xs={4}
176+
style={{
177+
margin: 0,
178+
padding: 0,
179+
}}
180+
>
174181
<IconButton
175182
className="htmlicons"
176183
aria-label="Paragraph"
@@ -182,15 +189,19 @@ class HTMLComponentPanel extends Component {
182189
padding: 0,
183190
}}
184191
>
185-
<ParagraphIcon style={{ color: '#e0e0e0' }} />
192+
<ParagraphIcon
193+
style={{ color: '#e0e0e0', paddingRight: '0px', marginRight: '0px' }}
194+
/>
186195
</IconButton>
187196
<Chip
188197
label="Paragraph"
189198
className={classes.chip}
190199
variant="outlined"
191200
style={{
192201
color: 'white',
193-
fontSize: '50%',
202+
fontSize: '62%',
203+
padding: '0px',
204+
margin: '0px',
194205
}}
195206
/>
196207
</Grid>

src/components/HtmlAttr.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class HtmlAttr extends Component {
8181
notchedOutline: classes.notchedOutline,
8282
},
8383
}}
84-
style={{ background: '#424242', height: '80%' }}
84+
style={{ background: '#424242', height: '70%' }}
8585
label={attr}
8686
variant="outlined"
8787
id={attr}
@@ -92,7 +92,7 @@ class HtmlAttr extends Component {
9292
<Grid item xs={1}>
9393
<Fab
9494
variant="extended"
95-
size="large"
95+
size="small"
9696
color="default"
9797
aria-label="Save"
9898
style={{
@@ -107,7 +107,7 @@ class HtmlAttr extends Component {
107107
</Fab>
108108
</Grid>
109109
<Grid item xs={4}>
110-
<Paper className={classes.root} style={{ height: '80%' }}>
110+
<Paper className={classes.root} style={{ height: '70%' }}>
111111
<p style={{ color: 'black' }}>
112112
{focusChild.HTMLInfo[attr] ? focusChild.HTMLInfo[attr] : ' no attribute assigned'}
113113
</p>

src/components/KonvaStage.tsx

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -147,19 +147,7 @@ class KonvaStage extends Component {
147147
}}
148148
tabIndex="0" // required for keydown event to be heard by this.container
149149
>
150-
{/* <Button
151-
onClick={deleteChild}
152-
style={{
153-
width: '150px',
154-
position: 'relative',
155-
float: 'right',
156-
background: '#dbdbdb',
157-
zIndex: 2,
158-
}}
159-
>
160-
delete child
161-
</Button> */}
162-
<Fab
150+
{/* <Fab
163151
variant="extended"
164152
size="small"
165153
color="inherit"
@@ -179,7 +167,7 @@ class KonvaStage extends Component {
179167
>
180168
<DeleteIcon />
181169
Delete Child
182-
</Fab>
170+
</Fab> */}
183171
<Stage
184172
className={'canvasStage'}
185173
ref={node => {

src/components/LeftColExpansionPanel.jsx

Lines changed: 36 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
import React, { Fragment } from "react";
2-
import { withStyles } from "@material-ui/core/styles";
3-
import Typography from "@material-ui/core/Typography";
4-
import List from "@material-ui/core/List";
5-
import ListItem from "@material-ui/core/ListItem";
6-
import ListItemText from "@material-ui/core/ListItemText";
7-
import IconButton from "@material-ui/core/IconButton";
8-
import Grid from "@material-ui/core/Grid";
9-
import AddIcon from "@material-ui/icons/Add";
10-
import DeleteIcon from "@material-ui/icons/Delete";
11-
import Fab from "@material-ui/core/Fab";
1+
import React, { Fragment } from 'react';
2+
import { withStyles } from '@material-ui/core/styles';
3+
import Typography from '@material-ui/core/Typography';
4+
import List from '@material-ui/core/List';
5+
import ListItem from '@material-ui/core/ListItem';
6+
import ListItemText from '@material-ui/core/ListItemText';
7+
import IconButton from '@material-ui/core/IconButton';
8+
import Grid from '@material-ui/core/Grid';
9+
import AddIcon from '@material-ui/icons/Add';
10+
import DeleteIcon from '@material-ui/icons/Delete';
11+
import Button from '@material-ui/core/Button';
1212

1313
const LeftColExpansionPanel = props => {
1414
const {
@@ -82,49 +82,51 @@ const LeftColExpansionPanel = props => {
8282
{directParents ? (
8383
<p
8484
style={{
85-
marginLeft: "10px",
86-
color: "white",
87-
fontSize: "12px",
88-
marginTop: "1px"
85+
padding: '0px',
86+
marginTop: '0px',
87+
marginLeft: '15px',
88+
color: '#D3D3D3',
89+
fontSize: '12px',
8990
}}
9091
>
9192
Used in: {directParents}
9293
</p>
9394
) : (
9495
<p
9596
style={{
96-
marginLeft: "10px",
97-
color: "white",
98-
fontSize: "12px",
99-
marginTop: "1px"
97+
padding: '0px',
98+
marginTop: '0px',
99+
marginLeft: '15px',
100+
color: '#D3D3D3',
101+
fontSize: '12px',
100102
}}
101103
>
102104
Not used
103105
</p>
104106
)}
105107
</span>
106-
<Fab
107-
variant="extended"
108+
<Button
109+
variant="text"
108110
size="small"
109-
color="inherit"
111+
color="default"
110112
aria-label="Delete"
111113
className={classes.margin}
114+
onClick={() => deleteComponent({
115+
componentId: id,
116+
stateComponents: components,
117+
})
118+
}
112119
style={{
113-
marginLeft: "10px",
114-
marginTop: "5px",
115-
marginBottom: "10px"
120+
color: '#D3D3D3',
121+
marginBottom: '10px',
122+
marginTop: '0px',
123+
marginLeft: '11px',
124+
padding: '0px',
116125
}}
117-
// style={{ maxWidth: "20px" }}
118-
onClick={() =>
119-
deleteComponent({
120-
componentId: id,
121-
stateComponents: components
122-
})
123-
}
124126
>
125-
<DeleteIcon />
127+
<DeleteIcon style={{ color: '#D3D3D3' }} />
126128
Delete
127-
</Fab>
129+
</Button>
128130
{/* <IconButton
129131
style={{ display: "inline-block" }}
130132
onClick={() =>

src/components/SimpleModal.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ const SimpleModal = (props) => {
7878
<div>
7979
{secBtnLabel ? (
8080
<Button
81-
variant="extendedFab"
81+
variant="contained"
8282
color="secondary"
8383
className={classes.button}
8484
onClick={secBtnAction}
@@ -88,7 +88,7 @@ const SimpleModal = (props) => {
8888
) : null}
8989
{primBtnLabel ? (
9090
<Button
91-
variant="extendedFab"
91+
variant="contained"
9292
color="primary"
9393
className={classes.button}
9494
onClick={primBtnAction}

src/containers/LeftContainer.tsx

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,39 @@ const mapDispatchToProps = (dispatch: any) => ({
3838
changeFocusChild: ({ childId }: { childId: number }) => dispatch(actions.changeFocusChild({ childId })),
3939
deleteComponent: ({ componentId, stateComponents }: { componentId: number; stateComponents: ComponentsInt }) =>
4040
dispatch(actions.deleteComponent({ componentId, stateComponents })),
41+
deleteAllData: () => dispatch(actions.deleteAllData()),
42+
createApp: ({ path, components, genOption }) =>
43+
dispatch(
44+
actions.createApplication({
45+
path,
46+
components,
47+
genOption,
48+
}),
49+
),
4150
});
4251

4352
class LeftContainer extends Component<Props> {
4453
state = {
4554
componentName: '',
4655
modal: null,
4756
genOptions: ['Export components', 'Export components with application files'],
57+
genOption: 0,
4858
};
4959

60+
constructor(props) {
61+
super(props);
62+
63+
IPC.on('app_dir_selected', (event, path) => {
64+
const { components } = this.props;
65+
const { genOption } = this.state;
66+
this.props.createApp({
67+
path,
68+
components,
69+
genOption,
70+
});
71+
});
72+
}
73+
5074
handleChange = event => {
5175
this.setState({
5276
[event.target.name]: event.target.value,

src/public/styles/style.css

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -80,24 +80,12 @@ LEFT COLUMN
8080
.left {
8181
padding: 20px;
8282
width: 20%;
83-
min-width: 350px;
83+
min-width: 300px;
8484
display: flex;
8585
flex-direction: column;
8686
position: relative;
8787
}
8888

89-
.htmlPanel {
90-
/* position: absolute;
91-
bottom: 0;
92-
margin-right: 50px;
93-
margin-left: 50px;
94-
margin-bottom: 50px;
95-
left: 0px;
96-
right: 0px;
97-
width: 100%;
98-
padding: 1%; */
99-
}
100-
10189
.component-input {
10290
bottom: 2.8%;
10391
}

0 commit comments

Comments
 (0)