Skip to content

Commit

Permalink
Remove unnecessary line breaks from tabs component
Browse files Browse the repository at this point in the history
  • Loading branch information
NickColley committed May 15, 2019
1 parent a70a500 commit 6df3b1c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/components/tabs/template.njk
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
{#- If an id 'prefix' is not passed, fall back to using the name attribute
instead. We need this for error messages and hints as well -#}
{% set idPrefix = params.idPrefix if params.idPrefix %}
{% set idPrefix = params.idPrefix if params.idPrefix -%}

<div {%- if params.id %} id="{{params.id}}"{% endif %} class="govuk-tabs {%- if params.classes %} {{ params.classes }}{% endif %}" {%- for attribute, value in params.attributes %} {{attribute}}="{{value}}"{% endfor %} data-module="tabs">
<h2 class="govuk-tabs__title">
{{ params.title | default ("Contents") }}
</h2>

{% if(params.items) %}
<ul class="govuk-tabs__list">
{% for item in params.items %}
Expand All @@ -20,7 +19,6 @@
{% endfor %}
</ul>
{% endif %}

{% for item in params.items %}
{% set id = item.id if item.id else idPrefix + "-" + loop.index %}
<section class="govuk-tabs__panel{% if loop.index > 1 %} govuk-tabs__panel--hidden{% endif %}" id="{{ id }}"{% for attribute, value in item.panel.attributes %} {{attribute}}="{{value}}"{% endfor %}>
Expand Down

0 comments on commit 6df3b1c

Please sign in to comment.