File tree Expand file tree Collapse file tree 1 file changed +22
-7
lines changed
packages/components/bolt-video/src Expand file tree Collapse file tree 1 file changed +22
-7
lines changed Original file line number Diff line number Diff line change 12
12
{% set collapsed = collapsed | default(true ) %}
13
13
{% set ratio = ratio ?? true %}
14
14
15
- {# @todo @salem Is this used anywhere?#}
16
15
{% set classes = [
17
16
baseClass ,
18
17
collapsed is not null and collapsed == false ? " is-expanded" : " is-collapsed"
19
18
] %}
20
19
21
-
22
- {% set videoTag %}
23
- {% include " @bolt/_video-tag.twig" %}
20
+ {% set utilClasses = utils | default([]) %}
21
+ {% set otherClasses = others | default([]) %}
22
+
23
+ {% for class in attributes ["class" ] %}
24
+ {% if class starts with " u-" %}
25
+ {% set utilClasses = utilClasses | merge ([class ]) %}
26
+ {% else %}
27
+ {% set otherClasses = otherClasses | merge ([class ]) %}
28
+ {% endif %}
29
+ {% endfor %}
30
+
31
+ {% set innerVideo %}
32
+ {% include " @bolt/_video-tag.twig" with {
33
+ attributes : {
34
+ class : otherClasses
35
+ }
36
+ } %}
24
37
{% endset %}
25
38
26
39
{% if ratio == true %}
27
40
{% include " @bolt/ratio.twig" with {
28
41
aspectRatioHeight : aspectRatioHeight ?? 9 ,
29
42
aspectRatioWidth : aspectRatioWidth ?? 16 ,
30
- children : videoTag ,
31
- attributes : attributes
43
+ children : innerVideo ,
44
+ attributes : {
45
+ class : utilClasses
46
+ }
32
47
} only %}
33
48
{% else %}
34
- {{ videoTag } }
49
+ {% include " @bolt/_video-tag.twig " % }
35
50
{% endif %}
You can’t perform that action at this time.
0 commit comments