@openeuropa/bcl-modal 1.10.6 → 1.10.8

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.
Files changed (2) hide show
  1. package/modal.html.twig +16 -4
  2. package/package.json +2 -2
package/modal.html.twig CHANGED
@@ -14,7 +14,10 @@
14
14
  - body (block) (default: '')
15
15
  - footer (block) (default: '')
16
16
  - attributes (drupal attrs)
17
-
17
+ - header_attributes (drupal attrs)
18
+ - body_attributes (drupal attrs)
19
+ - footer_attributes (drupal attrs)
20
+
18
21
  Blocks
19
22
  - header
20
23
  - messages
@@ -29,9 +32,12 @@
29
32
  {% set _verticaly_centered = verticaly_centered ?? false %}
30
33
  {% set _scrollable = scrollable ?? false %}
31
34
  {% set _header = header|default('') %}
35
+ {% set _header_attributes = header_attributes ?: create_attribute() %}
32
36
  {% set _messages = messages|default('') %}
33
37
  {% set _body = body|default('') %}
38
+ {% set _body_attributes = body_attributes ?: create_attribute() %}
34
39
  {% set _footer = footer|default('') %}
40
+ {% set _footer_attributes = footer_attributes ?: create_attribute() %}
35
41
 
36
42
  {% set _classes = ['modal', 'fade'] %}
37
43
 
@@ -62,16 +68,22 @@
62
68
  >
63
69
  <div class="modal-content">
64
70
  {% if header is not empty %}
65
- <div class="modal-header">
71
+ <div
72
+ {{- _header_attributes.addClass(['modal-header']) -}}
73
+ >
66
74
  {%- block header _header -%}
67
75
  </div>
68
76
  {% endif %}
69
77
  {%- block messages _messages -%}
70
- <div class="modal-body">
78
+ <div
79
+ {{- _body_attributes.addClass(['modal-body']) -}}
80
+ >
71
81
  {%- block body _body -%}
72
82
  </div>
73
83
  {% if footer is not empty %}
74
- <div class="modal-footer">
84
+ <div
85
+ {{- _footer_attributes.addClass(['modal-footer']) -}}
86
+ >
75
87
  {%- block footer _footer -%}
76
88
  </div>
77
89
  {% endif %}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@openeuropa/bcl-modal",
3
3
  "author": "European Commission",
4
4
  "license": "EUPL-1.2",
5
- "version": "1.10.6",
5
+ "version": "1.10.8",
6
6
  "publishConfig": {
7
7
  "access": "public"
8
8
  },
@@ -21,5 +21,5 @@
21
21
  "design-system",
22
22
  "twig"
23
23
  ],
24
- "gitHead": "f2c1911b328b12531079c209ecada73a505713c2"
24
+ "gitHead": "9c2e64443ae179948cbf748c41d438af7a0f2421"
25
25
  }