-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: use appearance to style radio buttons and checkboxes (#357)
- Loading branch information
1 parent
41d61f9
commit 06d95df
Showing
3 changed files
with
50 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/components/10-atoms/100-form-elements/50-radio-buttons/radio-buttons.njk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<ul class="input-group {% if inverse %} input-group--inverse{% endif %}{% if select.modifiers %}{% for modifier in select.modifiers %} input-group--{{ modifier }}{% endfor %}{% endif %}"> | ||
{% for radioButton in radioButtons %} | ||
<li><input id="{{ radioButton.name }}" type="radio" name="radio" value="{{ value }}"{% if radioButton.checked %} checked{% elseif radioButton.disabled %} disabled{% endif %} /><label for="{{ radioButton.name }}">{{ radioButton.label }}</label></li> | ||
<li><label class="label--radio" for="{{ radioButton.name }}"><input id="{{ radioButton.name }}" type="radio" name="radio" value="{{ value }}"{% if radioButton.checked %} checked{% elseif radioButton.disabled %} disabled{% endif %} />{{ radioButton.label }}</label></li> | ||
{% endfor %} | ||
</ul> |
3 changes: 1 addition & 2 deletions
3
src/components/10-atoms/100-form-elements/_checkbox/_checkbox.njk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
{% if standAlone %}<p{% if modifiers %} class="{% for modifier in modifiers %} input-group--{{ modifier }}{% endfor %}"{% endif %}>{% endif %} | ||
<input id="{{ name | slugify }}" type="checkbox" name="{{ name }}" value="{{ value }}"{% if checked %} checked{% endif %}{% if disabled %} disabled{% endif %} /> | ||
<label for="{{ name | slugify }}">{{ label }}</label> | ||
<label class="label--checkbox" for="{{ name | slugify }}"><input id="{{ name | slugify }}" type="checkbox" name="{{ name }}" value="{{ value }}"{% if checked %} checked{% endif %}{% if disabled %} disabled{% endif %} />{{ label }}</label> | ||
{% if standAlone %}</p>{% endif %} |