You are here

sidr-trigger.html.twig in Sidr: Accessible Mobile Menus 8.3

Same filename and directory in other branches
  1. 8.2 templates/sidr-trigger.html.twig

Default theme implementation to display a Sidr Trigger.

Available variables:

  • configuration: Block configuration.
  • options: Sidr options (derived from configuration).
  • attributes: Attributes for the Sidr trigger.
  • trigger_icon: Markup for the trigger's icon (if any).
  • trigger_text: Markup for the trigger's text (if any).

File

templates/sidr-trigger.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation to display a Sidr Trigger.
  5. *
  6. * Available variables:
  7. * - configuration: Block configuration.
  8. * - options: Sidr options (derived from configuration).
  9. * - attributes: Attributes for the Sidr trigger.
  10. * - trigger_icon: Markup for the trigger's icon (if any).
  11. * - trigger_text: Markup for the trigger's text (if any).
  12. *
  13. * @see template_preprocess_sidr_trigger()
  14. *
  15. * @ingroup themeable
  16. */
  17. #}
  18. <button {{ attributes }}>
  19. {% if trigger_icon %}<span class="sidr-trigger__icon">{{ trigger_icon }}</span>{% endif %}
  20. {% if trigger_text %}<span class="sidr-trigger__text">{{ trigger_text }}</span>{% endif %}
  21. </button>