stack/src/components/forms/filtration-form/filtration-form.twig line 1

Open in your IDE?
  1. {% set com_props = props %}
  2. {%- set class_name = [
  3.   "f-filtration",
  4.   props.variant in ["inline"] ? "--" ~ props.variant : "--default",
  5. ]|join(' ')|trim -%}
  6. {%- set attrs = [
  7.   'class="' ~ class_name ~ '"',
  8. ] -%}
  9. {%- set attrs = attrs|join(' ')|trim -%}
  10. {% set is_inline = props.variant == "inline" ?? false %}
  11. <div {{ attrs|raw }}>
  12.   <header class="f-filtration__header u-posr d-flex align-items-center justify-content-between flex-column flex-sm-row gap-1 py-1 px-2">
  13.     <div class="f-filtration__title u-color-primary u-fz-lg u-fw-500">{{ "Filtrovat položky"|trans }}</div>
  14.     {% if is_inline %}
  15.       {% include "@Components/icon/icon.twig" with {props: {
  16.         src: "@Images/svg/filter.svg",
  17.         size: "lg",
  18.         color: "primary",
  19.         stroke_off: true,
  20.         extra_class: "f-filtration__icon"
  21.       }} %}
  22.     {% else %}
  23.       {% include "@Components/button/button.twig" with {props: {
  24.         tag: "button",
  25.         type: "button",
  26.         variant: "outline",
  27.         size: "sm",
  28.         title: "Otevřít filtraci"|trans,
  29.         icon: {
  30.           src: "@Images/svg/filter.svg"
  31.         },
  32.         data: {
  33.           "close-title": "Zavřít filtraci"|trans,
  34.         },
  35.         full_width_mobile: true,
  36.         extra_class: "--js-open-filter"
  37.       }} %}
  38.     {% endif %}
  39.   </header>
  40.   <div class="f-filtration__body">
  41.     {% include "@Components/forms/filtration-form/filtration-form--raw.twig" with {props: props} %}
  42.   </div>
  43. </div>