The @uol-status-message component provides a method of displaying messages with statuses and corresponding status icons.
Available statuses are:
This component is currently only used within the @uol-people-profile-card component.
Do not use outside the @uol-people-profile-card component.
Name | Type | Required/Optional | Description |
---|---|---|---|
type | string | Required. | ‘info’, ‘success’, ‘error’ or ‘warning’ |
text | string | Required. | Text string. May contain <strong> , <em> or <a> tags |
'context': {
'type': 'info',
'text': '<strong>This</strong> in an info message'
},
<div class="uol-status-message {% if type %} uol-status-message--{{ type }} {% endif %}">
<span class="uol-icon {% if type %} uol-icon--status-{{ type }} {% endif %}">
{% if type %}<span class="hide-accessible">{{ type | title }}:</span>{% endif %}
{{ text | safe }}
</span>
</div>
<div class="uol-status-message uol-status-message--error ">
<span class="uol-icon uol-icon--status-error ">
<span class="hide-accessible">Error:</span>
This is a warning
</span>
</div>
.uol-status-message {
display: block;
+ .uol-status-message {
margin-top: $spacing-2;
}
color: $color-font--dark;
strong {
font-weight: $font-weight-medium--sans-serif;
}
svg {
path {
fill: $color-black--dark;
@media screen and (forced-colors: active) {
fill: CanvasText;
}
}
}
svg + .uol-icon__label {
margin-left: $spacing-1;
}
}
{
"type": "error",
"text": "This is a warning"
}