import React from 'react';
import { ITask } from './Task';
interface ITaskFormProps {
addANewTask: (task: ITask) => void
}
class TaskForm extends React.Component < ITaskFormProps, any > {
handleInputChange(event: React.ChangeEvent < HTMLInputElement | HTMLTextAreaElement > ) {
}
render(): JSX.Element {
return (
<div className="card card-body">
<form>
<div className="form-group">
<input onChange={event => this.handleInputChange(event)} type="text" placeholder="Add A Task" name="title" value="" className="form-control" autoFocus/>
</div>
<div className="form-group">
<textarea onChange={event => this.handleInputChange(event)} name="description" className="form-control" value=""></textarea>
</div>
<button type="submit" className="btn btn-primary btn-block">
Save
</button>
</form>
</div>
);
}
}
export default TaskForm;