add closing icon and action to hook error

This commit is contained in:
Lisa Passing 2015-04-22 16:20:26 +02:00
parent 3703194709
commit c76d4de614
3 changed files with 12 additions and 1 deletions

View File

@ -8,4 +8,7 @@ HooksListItemComponent = Ember.Component.extend
handleToggleError: ->
@set("errorMessage", "There was an error")
close: ->
@set("errorMessage", null)
`export default HooksListItemComponent`

View File

@ -213,3 +213,9 @@ p.profile-user-last
height: 1.2em
background: #f1b6ad
transform: rotate(45deg)
.close
@extend .icon
position: absolute
top: 1em
right: 1em
@extend .icon--dismiss-red

View File

@ -13,6 +13,8 @@
{{#if errorMessage}}
<div class="error">
<p>{{errorMessage}}</p>
<p>
{{errorMessage}}
<a class="close" {{action "close" target=view}}></a></p>
</div>
{{/if}}