Closed jowan closed 2 years ago
In the docs: https://wingsuit-designsystem.github.io/components/presentation/#additional-twig-functions
pattern_preview(patternId, variantId, variables) and pattern(patternId, variantId, variables)
pattern_preview(patternId, variantId, variables)
pattern(patternId, variantId, variables)
should be:
pattern_preview(patternId, variables, variantId) and pattern(patternId, variables, variantId)
pattern_preview(patternId, variables, variantId)
pattern(patternId, variables, variantId)
respectively. Which closely follows :
https://ui-patterns.readthedocs.io/en/8.x-1.x/content/developer-documentation.html#render-patterns-using-twig-functions
However, Patterns UI does not support vars in pattern_preview, and I'd suggest dropping that parameter to maintain compatibility.
The below works for me:
{# TEMPLATE #} <div id="ac-{{ pid }}" class="accordion"> {% for item in items %} {% set vars = { "aiid": item.aiid, "pid": pid, "label": item.label, "content": item.content, "toggle": toggle, } %} {{ pattern('bs_accordion_item', vars, '__default') }} {{ pattern_preview('bs_accordion_item', vars, '__default') }} {% endfor %} </div>
In the docs: https://wingsuit-designsystem.github.io/components/presentation/#additional-twig-functions
pattern_preview(patternId, variantId, variables)
andpattern(patternId, variantId, variables)
should be:
pattern_preview(patternId, variables, variantId)
andpattern(patternId, variables, variantId)
respectively. Which closely follows :
https://ui-patterns.readthedocs.io/en/8.x-1.x/content/developer-documentation.html#render-patterns-using-twig-functions
However, Patterns UI does not support vars in pattern_preview, and I'd suggest dropping that parameter to maintain compatibility.
The below works for me: