Skip to content

Commit

Permalink
VACMS-18843 Update tables to v3 (#2300)
Browse files Browse the repository at this point in the history
* VACMS-18843 Update tables to v3

* Remove scope

* Remove table margin on top and bottom
  • Loading branch information
randimays authored Oct 3, 2024
1 parent cbb285f commit c16fca3
Showing 1 changed file with 28 additions and 24 deletions.
52 changes: 28 additions & 24 deletions src/site/paragraphs/table.drupal.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -26,29 +26,33 @@
}
}
{% endcomment %}
<div class="va-table-margin">
<va-table data-template="paragraphs/table" data-entity-id="{{ entity.entityId }}" role="table" table-title="{{ entity.fieldTable.caption }}">
{% assign colLabels = entity.fieldTable.value.0 %}
{% for value in entity.fieldTable.value %}
{% if forloop.first == true %}
<va-table-row slot="headers" key="header">
{% for column in value %}
{% if column == "" or column == nil %}
<span role="columnheader"> </span>
<va-table
data-template="paragraphs/table"
data-entity-id="{{ entity.entityId }}"
table-title="{{ entity.fieldTable.caption }}"
table-type="bordered"
uswds
>
{% assign colLabels = entity.fieldTable.value.0 %}
{% for value in entity.fieldTable.value %}
{% if forloop.first == true %}
<va-table-row>
{% for column in value %}
{% if column == "" or column == nil %}
<span> </span>
{% else %}
<span role="columnheader" scope="col">{{ column }}</span>
<span>{{ column }}</span>
{% endif %}
{% endfor %}
</va-table-row>
{% else %}
<va-table-row>
{% for column in value %}
<span>
{{ column }}
</span>
{% endfor %}
</va-table-row>
{% endif %}
{% endfor %}
</va-table>
</div>
{% endfor %}
</va-table-row>
{% else %}
<va-table-row>
{% for column in value %}
<span>
{{ column }}
</span>
{% endfor %}
</va-table-row>
{% endif %}
{% endfor %}
</va-table>

0 comments on commit c16fca3

Please sign in to comment.