Skip to content

Commit fc6d598

Browse files
author
Daniel Morse
committed
fix: 'ratio' prop conflicts with prop set from background template, update name in background template
1 parent ad560ad commit fc6d598

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/components/bolt-background/src/background.twig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,12 @@
5555
{% for item in contentItems %}
5656

5757
{% set itemAttributes = item.pattern ~ "Attributes" %}
58+
{% set ratioKey = item.pattern == "image" ? "useAspectRatio" : "ratio" %}
5859
{% include pattern_template(item.pattern) with item | merge({
5960
(itemAttributes): {
6061
class: ["c-bolt-background__#{item.pattern}"]
6162
},
62-
ratio: false,
63+
(ratioKey): false,
6364
lazyload: item.lazyload ? item.lazyload : true
6465
}) only %}
6566
{% endfor %}

0 commit comments

Comments
 (0)