Skip to content
Snippets Groups Projects
Commit 3e873b3a authored by Eric Bremner's avatar Eric Bremner
Browse files

ISTWCMS-4704: updating tabs to now have a just buttons option and to all for...

ISTWCMS-4704: updating tabs to now have a just buttons option and to all for button specific classes
parent 07e511f6
No related branches found
No related tags found
1 merge request!66ISTWCMS-4704: adding date component with ability to handle multiple dates and...
......@@ -4,8 +4,16 @@
{% for type in content_list %}
{% if tab_type == "link" %}
<a href="{{ type.url }}" class="uw-tablinks {{ button_modifier_classes }}{% if type.active %} active{% endif %}">{{ type.text }}</a>
{% elseif tab_type == "button" %}
{% set button_class -%}
uw-tablinks {{ button_modifier_classes }}{% if type.button_class %} {{ type.button_class }}{% endif %}
{%- endset %}
<button class="{{ button_class }}">{{ type.text }}</button>
{% else %}
<button role="tab" class="uw-tablinks {{ button_modifier_classes }}" {% if loop.index == 1 %} aria-selected="true" {% else %} aria-selected="false" {% endif %} aria-controls="{{ type }}" id="tab-{{ loop.index }}" tabindex="0">{{ type }}</button>
{% set button_class -%}
uw-tablinks {{ button_modifier_classes }}{% if type.button_class %} {{ type.button_class }}{% endif %}
{%- endset %}
<button role="tab" class="{{ button_class }}" {% if loop.index == 1 %} aria-selected="true" {% else %} aria-selected="false" {% endif %} aria-controls="{{ type }}" id="tab-{{ loop.index }}" tabindex="0">{{ type }}</button>
{% endif %}
{% endfor %}
</div>
......
{% set button_modifier_classes -%}
button button--large {{ modifier_classes }}
{%- endset %}
{% include "@components/tabs/_tabs.twig" with {
tab_type: 'button',
content_list: content_list,
button_modifier_classes: button_modifier_classes,
tabs_modifier_class: tabs_modifier_class,
} %}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment