@openeuropa/bcl-alert 0.19.0 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/alert.html.twig +13 -5
- package/package.json +2 -2
package/alert.html.twig
CHANGED
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
- variant (string) (default: 'primary')
|
|
7
7
|
- dismissible (boolean) (default: true)
|
|
8
8
|
- animated_dismiss (boolean) (default: true)
|
|
9
|
-
-
|
|
9
|
+
- icon_path (string) (default: '')
|
|
10
10
|
- icon_name (string) (default: '')
|
|
11
11
|
#}
|
|
12
12
|
|
|
13
13
|
{% set _message = message|default('') %}
|
|
14
14
|
{% set _variant = variant|default('primary') %}
|
|
15
15
|
{% set _heading = heading|default('') %}
|
|
16
|
-
{% set
|
|
16
|
+
{% set _icon_path = icon_path|default('') %}
|
|
17
17
|
{% set _dismissible = dismissible ?? true %}
|
|
18
18
|
{% set _animated_dismiss = animated_dismiss ?? true %}
|
|
19
19
|
{% set _icon_name = icon_name|default('') %}
|
|
@@ -37,6 +37,14 @@
|
|
|
37
37
|
{% set _classes = _classes|merge(['fade', 'show']) %}
|
|
38
38
|
{% endif %}
|
|
39
39
|
|
|
40
|
+
{% set _classes = _classes|merge(['text-dark']) %}
|
|
41
|
+
|
|
42
|
+
{% set _icon_classes = ['flex-shrink-0 me-3 mt-1 align-self-start' ] %}
|
|
43
|
+
|
|
44
|
+
{% if _variant != 'light' %}
|
|
45
|
+
{% set _icon_classes = _icon_classes|merge(['text-' ~ _variant]) %}
|
|
46
|
+
{% endif %}
|
|
47
|
+
|
|
40
48
|
{% if attributes is empty %}
|
|
41
49
|
{% set attributes = create_attribute() %}
|
|
42
50
|
{% endif %}
|
|
@@ -44,12 +52,12 @@
|
|
|
44
52
|
{% set attributes = attributes.addClass(_classes).setAttribute('role', 'alert') %}
|
|
45
53
|
|
|
46
54
|
<div {{ attributes }}>
|
|
47
|
-
{% if
|
|
55
|
+
{% if _icon_path is not empty %}
|
|
48
56
|
{% include '@oe-bcl/bcl-icon/icon.html.twig' with {
|
|
49
57
|
name: _icon_name ?: _icon_names[_variant],
|
|
50
58
|
size: 's',
|
|
51
|
-
path:
|
|
52
|
-
attributes: create_attribute().addClass(
|
|
59
|
+
path: _icon_path,
|
|
60
|
+
attributes: create_attribute().addClass(_icon_classes),
|
|
53
61
|
} only %}
|
|
54
62
|
{% endif %}
|
|
55
63
|
<div class="alert-content flex-grow-1">
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@openeuropa/bcl-alert",
|
|
3
3
|
"author": "European Commission",
|
|
4
4
|
"license": "EUPL-1.2",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.22.0",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
8
8
|
},
|
|
@@ -21,5 +21,5 @@
|
|
|
21
21
|
"design-system",
|
|
22
22
|
"twig"
|
|
23
23
|
],
|
|
24
|
-
"gitHead": "
|
|
24
|
+
"gitHead": "57304ad94ae3c234f2f2b904208ce540a7a53f23"
|
|
25
25
|
}
|