Skip to content

Commit

Permalink
Fix mutually exclusive when no legend supplied (#390)
Browse files Browse the repository at this point in the history
  • Loading branch information
bameyrick authored May 24, 2019
1 parent a98b662 commit 03de060
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/components/field/_macro.njk
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

{% if params.legend or (params.mutuallyExclusive and params.legend) %}
{% if not params.noField %}
<fieldset{% if params.id %} id="{{ params.id }}"{% endif %} class="field{% if params.mutuallyExclusive %} field--exclusive{% endif %}{% if params.classes %} {{ params.classes }}{% endif %}">
<fieldset{% if params.id %} id="{{ params.id }}"{% endif %} class="field{% if params.mutuallyExclusive %} js-mutually-exclusive{% endif %}{% if params.classes %} {{ params.classes }}{% endif %}">
<legend class="field__legend {{ params.legendClasses }}">
{{ params.legend | safe }}
{% if params.description %}
Expand All @@ -43,7 +43,7 @@
{% endif %}
{% else %}
{% if not params.noField %}
<div{% if params.id %} id="{{ params.id }}"{% endif %} class="field{% if params.classes %} {{ params.classes }}{% endif %}">
<div{% if params.id %} id="{{ params.id }}"{% endif %} class="field{% if params.mutuallyExclusive %} js-mutually-exclusive{% endif %}{% if params.classes %} {{ params.classes }}{% endif %}">
{% endif %}
{% if params.description %}
<div class="field__description">{{ params.description }}</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/mutually-exclusive/mutually-exclusive.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import domready from 'js/domready';

const exclusiveWrapperClass = 'field--exclusive';
const exclusiveWrapperClass = 'js-mutually-exclusive';
const exclusiveGroupClass = 'js-exclusive-group';
const checkboxClass = 'js-exclusive-checkbox';
const voiceOverAlertClass = 'js-exclusive-alert';
Expand Down

0 comments on commit 03de060

Please sign in to comment.