atst/templates/components/toggle_list.html
2019-04-22 10:02:00 -04:00

17 lines
437 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) %}
<div v-show="selectedSection === '{{ section_name }}'">
{{ caller() }}
</div>
{% endmacro %}