This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import './App.css'; | |
| import SubmitForm from './components/SubmitForm/SubmitForm'; | |
| import TasksList from './components/TasksList/TasksList' | |
| class App extends React.Component{ | |
| constructor(props){ | |
| super(props); | |
| this.state ={tasks: []} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .tasks-list-container{ | |
| display: flex; | |
| width: 40%; | |
| margin: auto; | |
| justify-content: center; | |
| } | |
| .tasks-list{ | |
| width: 100%; | |
| padding-left: 10px; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import './TasksList.css' | |
| import Task from '../Task/Task'; | |
| class TasksList extends React.Component{ | |
| render(){ | |
| return ( | |
| <div className='tasks-list-container'> | |
| <div className='tasks-list'> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .task-container{ | |
| display: flex; | |
| border-bottom: 1px solid #979797; | |
| width: 100%; | |
| } | |
| .task-container-background{ | |
| display: flex; | |
| flex-grow: 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import './Task.css'; | |
| class Task extends React.Component{ | |
| constructor(props){ | |
| super(props); | |
| this.removeTask = this.removeTask.bind(this); | |
| this.markDone = this.markDone.bind(this); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| constructor(props){ | |
| super(props); | |
| this.state = { tasksCount: 0 }; | |
| this.addItem = this.addItem.bind(this); | |
| } | |
| addItem(e) { | |
| if (this._inputElement.value !== "") { | |
| var newItem = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .form{ | |
| margin-top: 100px; | |
| margin-bottom: 50px; | |
| } | |
| .input{ | |
| width: 400px; | |
| padding: 10px; | |
| border-radius: 15px; | |
| outline: none; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import './SubmitForm.css';a | |
| class SubmitForm extends React.Component{ | |
| render(){ | |
| return ( | |
| <div className='form'> | |
| <form> | |
| <input className='input' placeholder='Add Task' /> | |
| <button className='add-button' type='submit'>Add</button> | |
| </form> |