Skip to content

Commit

Permalink
Update AddComment.js
Browse files Browse the repository at this point in the history
  • Loading branch information
romabelka authored Jun 22, 2017
1 parent 589742f commit 0df08f0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/AddComment.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class AddComment extends Component {

handleUserChange = (ev) => {
if (ev.target.value.length < 5 || ev.target.value.length > 15){
//Не лезь в DOM. Я же говорил, что этого стоит избегать, задача писать в декларативном стиле
ev.target.style.border = '2px solid red'
} else{
ev.target.style.border = ''
Expand All @@ -49,4 +50,4 @@ class AddComment extends Component {

}

export default AddComment
export default AddComment

0 comments on commit 0df08f0

Please sign in to comment.