Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 24 additions & 29 deletions packages/components/src/components/hds/alert/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,32 @@
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: MPL-2.0
}}
<div
class={{this.classNames}}
role={{this._role}}
aria-live={{if this._role "polite"}}
aria-labelledby={{this._ariaLabelledBy}}
{{did-insert this.didInsert}}
...attributes
>
{{#if this.icon}}
<div class="hds-alert__icon">
<Hds::Icon @name={{this.icon}} @size={{this.iconSize}} @stretched={{true}} />
</div>
{{/if}}
<div role={{this._role}} aria-live={{if this._role "polite"}}>
<div class={{this.classNames}} aria-labelledby={{this._ariaLabelledBy}} {{did-insert this.didInsert}} ...attributes>
{{#if this.icon}}
<div class="hds-alert__icon">
<Hds::Icon @name={{this.icon}} @size={{this.iconSize}} @stretched={{true}} />
</div>
{{/if}}

<div class="hds-alert__content">
<div class="hds-alert__text {{if (eq @type 'compact') 'hds-typography-body-100' 'hds-typography-body-200'}}">
{{yield (hash Title=(component "hds/alert/title"))}}
{{yield (hash Description=(component "hds/alert/description"))}}
</div>
<div class="hds-alert__content">
<div class="hds-alert__text {{if (eq @type 'compact') 'hds-typography-body-100' 'hds-typography-body-200'}}">
{{yield (hash Title=(component "hds/alert/title"))}}
{{yield (hash Description=(component "hds/alert/description"))}}
</div>

<div class="hds-alert__actions">
{{yield
(hash
Button=(component "hds/button" size="small") LinkStandalone=(component "hds/link/standalone" size="small")
)
}}
<div class="hds-alert__actions">
{{yield
(hash
Button=(component "hds/button" size="small") LinkStandalone=(component "hds/link/standalone" size="small")
)
}}
</div>
{{yield (hash Generic=(component "hds/yield"))}}
</div>
{{yield (hash Generic=(component "hds/yield"))}}
</div>

{{#if this.onDismiss}}
<Hds::DismissButton class="hds-alert__dismiss" {{on "click" this.onDismiss}} />
{{/if}}
{{#if this.onDismiss}}
<Hds::DismissButton class="hds-alert__dismiss" {{on "click" this.onDismiss}} />
{{/if}}
</div>
</div>
Loading