atst/templates/components/toggle_list.html
2019-05-14 11:00:14 -04:00

17 lines
471 B
HTML

{% macro ToggleButton(action, open_html, close_html, section_name) %}
<span v-on:click="toggleSection('{{ section_name }}')">
<div v-if="selectedSection === '{{ section_name }}'">
{{ close_html }}
</div>
<div v-else>
{{ open_html }}
</div>
</span>
{% endmacro %}
{% macro ToggleSection(section_name, classes="") %}
<div v-show="selectedSection === '{{ section_name }}'" class='{{ classes }}'>
{{ caller() }}
</div>
{% endmacro %}