Skip to content

Commit

Permalink
feat: style todos with prefix 'work'
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrei Sevostianov authored and Andrei Sevostianov committed Sep 10, 2019
1 parent d1eefdf commit 22bec9f
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 7 deletions.
Binary file added .DS_Store
Binary file not shown.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,19 @@ We need to add lots of features quickly and be sure not to break any existing fu
## The Challenge

This is a copy of the todoMVC app (http://todomvc.com/), the simple todo list which allows user to keep track on his current and completed todos. Review 2 pull requests in this repo which added a new feature each to the app. Make sure that these features won't bring any bugs which could break functionality of our app. Provide us your comments. Your response will be avaluated by the issues you identify and how you communicate them.
The deployed app is live at https://qa.challenges.superstruct.tech.

## Instructions

How to attempt this challenge:

1) Make youself familiar with app. Click the link on top of this page to run the app in your browser
2) Open a deployed preview and see how app may look like if it will
You can find each deployed preview (deployed pull request) in the pull request:

1) Click on the 'Pull requests' tab on the top of the page
2) Click on a pull request you want to review
3) Click on 'Details' button in a green box with commit statuses, as shown in picture:
![Commit](commit.png)

## Instructions

How to attempt this challenge:

1) Create a private gist with your comments
2) Send your hiring contact the link to your secret gist.
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<title>React • TodoMVC</title>
<link rel="stylesheet" href="base.css">
<link rel="stylesheet" href="index.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<section class="todoapp"></section>
Expand Down
2 changes: 1 addition & 1 deletion js/app.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ var app = app || {};
app.ACTIVE_TODOS = 'active';
app.COMPLETED_TODOS = 'completed';
var TodoFooter = app.TodoFooter;
var TodoItem = app.TodoItem;
var TodoItem = app.TodoItem

var ENTER_KEY = 13;

Expand Down
11 changes: 10 additions & 1 deletion js/todoItem.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,18 @@ var app = app || {};
},

render: function () {
var prefix = this.props.todo.title.split(':');
var check = function (prefix) {
if (prefix.length > 1 && prefix[0] === 'work') {
return true
} else {
return false
}
}
return (
<li className={classNames({
completed: this.props.todo.completed,
workItem: check(prefix),
ompleted: this.props.todo.completed,
editing: this.props.editing
})}>
<div className="view">
Expand Down
3 changes: 3 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.workItem {
border-left: 3px solid blue;
}

0 comments on commit 22bec9f

Please sign in to comment.