Skip to content

Commit ae0b410

Browse files
timdavishbbmoz
authored andcommitted
Feature/#154902252 - Mary sees the list of tech when she tries to create a project (#164)
* feature(client): CreateProjectForm tech list * chore(client): fix typo
1 parent b62a3c2 commit ae0b410

File tree

3 files changed

+23
-9
lines changed

3 files changed

+23
-9
lines changed

client/components/CreateProjectForm/CreateProjectForm.js

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,24 @@ const causes = [
2222
'Other'
2323
]
2424

25+
const technologies = [
26+
'JavaScript',
27+
'Ruby',
28+
'Java',
29+
'Python',
30+
'PHP',
31+
'C++',
32+
'Other'
33+
]
34+
2535
class CreateProjectForm extends Component {
2636
constructor (props, context) {
2737
super(props, context)
2838
this.createProject = this.createProject.bind(this)
2939
this.saveFile = this.saveFile.bind(this)
3040
this.projectNameChange = this.projectNameChange.bind(this)
3141
this.handleCheckbox = this.handleCheckbox.bind(this)
32-
this.renderCauses = this.renderCauses.bind(this)
33-
42+
this.renderList = this.renderList.bind(this)
3443
this.state = {
3544
error: '',
3645
projectName: '',
@@ -64,12 +73,12 @@ class CreateProjectForm extends Component {
6473
})
6574
}
6675

67-
renderCauses () {
68-
return causes.map((cause, index) => {
76+
renderList (items) {
77+
return items.map((item, index) => {
6978
return (
7079
<FormControlLabel key={index}
71-
control={ <Checkbox value={cause} onChange={this.handleCheckbox} /> }
72-
label={cause}
80+
control={ <Checkbox value={item} onChange={this.handleCheckbox} /> }
81+
label={item}
7382
/>
7483
)
7584
})
@@ -91,7 +100,12 @@ class CreateProjectForm extends Component {
91100

92101
<FormLabel>Causes</FormLabel>
93102
<FormGroup row>
94-
{this.renderCauses()}
103+
{this.renderList(causes)}
104+
</FormGroup>
105+
106+
<FormLabel>Technologies</FormLabel>
107+
<FormGroup row>
108+
{this.renderList(technologies)}
95109
</FormGroup>
96110

97111
<Button type="submit" disabled={this.state.projectName.length === 0} raised className={classes.root} color="primary" fullWidth>

client/components/CreateProjectForm/CreateProjectForm.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@
2626
.buttonSubmit {
2727
@extend %buttonSubmit;
2828
grid-column: 1 / 1;
29-
grid-row: 6;
29+
grid-row: 8;
3030
}

client/components/CreateProjectForm/createProjectFormJss.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ export const buttonSubmit = {
44
root: {
55
...button.root,
66
gridColumn: '1 / 1',
7-
gridRow: 6
7+
gridRow: 8
88
}
99
}

0 commit comments

Comments
 (0)