From 0d0fa5386bf4066d7ad61eb7d830aedf03dd2e22 Mon Sep 17 00:00:00 2001 From: ashleydb Date: Thu, 22 Dec 2016 11:55:00 +0000 Subject: [PATCH] Restyling the app --- app/components/AddTodo.jsx | 2 +- app/components/Todo.jsx | 13 ++++++---- app/components/TodoApp.jsx | 24 ++++++------------- app/components/TodoList.jsx | 6 +++++ app/components/TodoSearch.jsx | 2 +- app/styles/app.scss | 3 +++ app/styles/base/_variables.scss | 8 ++++--- app/styles/components/_container.scss | 33 ++++++++++++++++++++++++++ app/styles/components/_page-title.scss | 5 ++++ app/styles/components/_todo.scss | 30 +++++++++++++++++++++++ app/tests/components/TodoList.test.jsx | 15 ++++++------ public/bundle.js | 12 +++++----- 12 files changed, 113 insertions(+), 40 deletions(-) create mode 100644 app/styles/components/_container.scss create mode 100644 app/styles/components/_page-title.scss create mode 100644 app/styles/components/_todo.scss diff --git a/app/components/AddTodo.jsx b/app/components/AddTodo.jsx index 53a4121..bd5a65d 100644 --- a/app/components/AddTodo.jsx +++ b/app/components/AddTodo.jsx @@ -14,7 +14,7 @@ var AddTodo = React.createClass({ render: function() { var {id, text, time, complete} = this.props; return ( -
+
diff --git a/app/components/Todo.jsx b/app/components/Todo.jsx index a4f44f5..49ee595 100644 --- a/app/components/Todo.jsx +++ b/app/components/Todo.jsx @@ -4,6 +4,7 @@ var moment = require('moment'); var Todo = React.createClass({ render: function() { var {id, text, createdAt, completedAt, complete} = this.props; + var todoClassName = (complete) ? 'todo todo-complete' : 'todo'; var renderDate = () => { var message = 'Created: '; @@ -16,12 +17,14 @@ var Todo = React.createClass({ } return ( -
{this.props.onToggle(this.props.id);}}> -