forked from ember-bootstrap/ember-bootstrap
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbs-alert.hbs
28 lines (26 loc) · 893 Bytes
/
bs-alert.hbs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<div
class="{{unless this.hidden "alert"}} {{if this.fade "fade"}} {{if this.dismissible "alert-dismissible"}} {{bs-type-class "alert" @type}} {{if this.showAlert (if (macroCondition (macroGetOwnConfig "isNotBS3")) "show" "in")}}"
...attributes
{{did-update this.showOrHide this._visible}}
{{did-update this.updateVisibility @visible}}
>
{{#unless this.hidden}}
{{#if this.dismissible}}
<button type="button" class="close" aria-label="Close" {{on "click" this.dismiss}}>
<span aria-hidden="true">×</span>
</button>
{{/if}}
{{#if (has-block "header")}}
{{#let (element (bs-default @headerTag "h4")) as |Tag|}}
<Tag class="alert-heading">
{{yield to="header"}}
</Tag>
{{/let}}
{{/if}}
{{#if (has-block "body")}}
{{yield to="body"}}
{{else}}
{{yield}}
{{/if}}
{{/unless}}
</div>