{% set attr = _args.attr|default({}) %}
{% set header = _args.header %}
{% set items = _args.items|default([]) %}
{% set style = _args.style|default('normal') %}
{% set attr = attr|merge({
class: 'table__data table__data--%s %s'|format(
style,
attr.class|default('')
)|trim,
}) %}
<div {{ attributes(attr) }}>
<div class="table-responsive">
<table class="w-100">
<thead>
{% include '@ui2022/table__header.html.twig' with header %}
</thead>
<tbody>
{% if block('items') is defined %}
{{ block('items') }}
{% else %}
{% for item in items %}
{% include '@ui2022/table__item.html.twig' with item %}
{% endfor %}
{% endif %}
</tbody>
</table>
</div>
</div>