delindell / houseplant-topia

0 stars 0 forks source link

(OUTDATED) Modal for Adding and updating Rooms #19

Closed delindell closed 4 years ago

delindell commented 4 years ago

User Story

AC

WHEN I click an add or edit room button THEN it should open a modal (pre-populated or not) AND it should then update state

Dev Notes


- [ ] The RoomFormModal component should establish all the prop-types at the top

- [ ] The state should then be established with all the possible changes via the form to follow and `isEditing: false`

- [ ] The modal should then have a form in the markup, something like this:
``` - Then a function outside the render like: ``` nameChange = (e) => { e.preventDefault(); this.setState({ roomName: e.target.value }); } ``` - [ ] Following all of the possible inputs there should be a JS ternary, something like: ``` { isEditing ? : } ```
delindell commented 4 years ago

image