Alerts

Contextual feedback messages for any user or system activities, styled and modifided with buttons.

Usage

To apply this component, add the .__wo-alert class to <div> element.

Example

Markup

<div class="__wo-alert" role="alert">Alert <strong>component</strong> with <a href="javascript:;">link</a> and without color class.</div>

It may contents header

Markup

<div class="__wo-alert" role="alert"><h4>Message header</h4><p>This alert contents header and paragraph</p></div>

Styling

Alert can styled with one of specified colors.

Example

Markup

<div class="__wo-alert --primary" role="alert">Alert component with <code>.--primary</code> class</div>
<div class="__wo-alert --success" role="alert">Alert component with <code>.--success</code> class</div>
<div class="__wo-alert --danger" role="alert">Alert component with <code>.--danger</code> class</div>
<div class="__wo-alert --warning" role="alert">Alert component with <code>.--warning</code> class</div>
<div class="__wo-alert --info" role="alert">Alert component with <code>.--info</code> class</div>

Icons

You can use any icon for this alerts.

Example

Markup

<div class="__wo-alert --success" role="alert"><i class="__wo-icon-rr-checkbox --mr"></i>Success alert with icon</div>
<div class="__wo-alert --danger" role="alert"><i class="__wo-icon-rr-exclamation --mr"></i>Danger alert with icon</div>

Close button

Also you can attach remove button to alert.

Example

Markup

<div class="__wo-alert --info" role="alert">Info alert message with remove button.<a class="__remove-btn" href="javascript:;" onclick="removeAlert(this)">×</a></div>

Add <a class="__remove-btn" href="javascript:;" onclick="removeAlert(this)">×</a> after content and button will be in right corner.