templates/hc/dropdown.html.twig line 1

Open in your IDE?
  1. {% set separator = _args.separator|default(null) %}
  2. {% set aria = _args.aria|default(null) %}
  3. {% set icon = _args.icon|default(null) %}
  4. {% set indicator = _args.indicator|default(null) %}
  5. {% set items = _args.items|default([]) %}
  6. {% set variant = _args.variant|default(null) %}
  7. {% set mobile = _args.mobile|default(false) %}
  8. {% set caret = _args.caret|default(false) %}
  9. <div class=
  10.      "hc-dropdown
  11.      {% if separator %}
  12.      hc-dropdown--with-separator
  13.      hc-dropdown--with-separator--{{ separator }}
  14.      {% endif %}
  15. ">
  16.     <div class="hc-dropdown-toggle">
  17.         {% block toggle %}
  18.             {% embed 'hc/button.html.twig' with {
  19.                 button: 'button',
  20.                 icon: icon,
  21.                 dropdown: {
  22.                     caret: caret,
  23.                 },
  24.             } %}
  25.             {% endembed %}
  26.         {% endblock %}
  27.         {% block content %}
  28.             {% embed 'hc/dropdown-menu.html.twig' with {
  29.                 variant: variant,
  30.                 items: items,
  31.                 mobile: mobile,
  32.             } %}
  33.             {% endembed %}
  34.         {% endblock %}
  35.     </div>
  36. </div>