Open stephencweiss opened 5 years ago
The create/edit forms are identical basically and can be a reusable resource.
theBudgetCategoryForm() { return ( <div> <form className="budget-category"> <label htmlFor="category">Category</label> <input id="category" name="category" value={this.state.category} onChange={this.handleChange} placeholder={this.props.budgetLine ? props.budgetLine.category : 'New budget category name...'} > </input> <label htmlFor="hoursAllocated">Hours</label> <input id="hoursAllocated" name="hours" value={this.state.hoursAllocated} onChange={this.handleChange} placeholder={this.props.budgetLine ? props.budgetLine.hours_allocated : 'Hours to allocate...'} > </input> </form> </div> ) }
The create/edit forms are identical basically and can be a reusable resource.