atst/templates/components/toggle_list.html
2019-11-12 11:44:38 -05:00

17 lines
723 B
HTML

{% macro ToggleButton(action, open_html, close_html, section_name, classes="", active_style=False) %}
<span v-on:click="toggleSection('{{ section_name }}')">
<span v-if="selectedSection === '{{ section_name }}'" class="accordion-table__item__toggler {{ classes }}{% if active_style -%} accordion-table__item__toggler--active{%- endif %}">
{{ close_html }}
</span>
<span v-else class="accordion-table__item__toggler {{ classes }}">
{{ open_html }}
</span>
</span>
{% endmacro %}
{% macro ToggleSection(section_name, classes="") %}
<div v-show="selectedSection === '{{ section_name }}'" class='accordion-table__item-toggle-content {{ classes }}'>
{{ caller() }}
</div>
{% endmacro %}