Skip to content

Commit

Permalink
Use icon component for country support table (#1221)
Browse files Browse the repository at this point in the history
* Use icon component for country support table

* Remove unused variable
  • Loading branch information
aduth authored and mitchellhenke committed May 6, 2024
1 parent 4363df5 commit d3e8a2a
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 38 deletions.
6 changes: 3 additions & 3 deletions _includes/components/icon.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{% comment %}
include
- icon
- size
- icon_size
{% endcomment %}

{% assign class = 'usa-icon' %}
{% if include.size > 1 %}
{% assign class = class | append: ' usa-icon--size-' | append: include.size %}
{% if include.icon_size %}
{% assign class = class | append: ' usa-icon--size-' | append: include.icon_size %}
{% endif %}
{% if include.class %}
{% assign class = class | append: ' ' | append: include.class %}
Expand Down
12 changes: 8 additions & 4 deletions _includes/country_support_table.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,12 @@
data-locale="{{ page.lang }}"
hidden
>
<span hidden data-item="icon-success" class="svg-wrapper svg-success">{% include svg/font-awesome-check-circle-solid.svg %}</span>
<span hidden data-item="icon-error" class="svg-wrapper svg-error">{% include svg/font-awesome-times-circle-solid.svg %}</span>
<span hidden data-item="icon-success" class="text-success">
{% include components/icon.html icon="check_circle" class="top-2px" %}
</span>
<span hidden data-item="icon-error" class="text-error">
{% include components/icon.html icon="cancel" class="top-2px" %}
</span>
<table hidden class="usa-table--borderless usa-table--sticky-header">
<thead>
<tr>
Expand All @@ -34,11 +38,11 @@
<td data-item="country"></td>
<td data-item="dialing-code"></td>
<td data-item="sms">
<span class="margin-right-05" data-item="icon" aria-hidden="true"></span>
<span class="margin-right-05" data-item="icon"></span>
<span data-item="text"></span>
</td>
<td data-item="voice">
<span class="margin-right-05" data-item="icon" aria-hidden="true"></span>
<span class="margin-right-05" data-item="icon"></span>
<span data-item="text"></span>
</td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion _includes/language_picker.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<span id="language-picker-{{ include.id }}-description" class="language-picker__label-text">
{{ site.data.[page.lang].settings.global.language }}
</span>
{% include components/icon.html icon='expand_more' size=3 class='language-picker__expander' %}
{% include components/icon.html icon='expand_more' icon_size=3 class='language-picker__expander' %}
</button>
{% else %}
<div class="language-picker__label language-picker__label--text">
Expand Down
1 change: 0 additions & 1 deletion _includes/svg/font-awesome-check-circle-solid.svg

This file was deleted.

1 change: 0 additions & 1 deletion _includes/svg/font-awesome-times-circle-solid.svg

This file was deleted.

2 changes: 0 additions & 2 deletions _sass/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ $border-color-secondary: $blue-mid !default;
$border-style: 1px solid $border-color;
$border-radius: 8px;

$icon-width: 0.8rem;

$space-tiny: 0.25rem !default;
$space-1: 0.5rem !default;

Expand Down
25 changes: 0 additions & 25 deletions _sass/components/_svg.scss

This file was deleted.

1 change: 0 additions & 1 deletion _sass/components/all.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,4 @@
@forward 'site';
@forward 'skip-nav';
@forward 'sticky-table';
@forward 'svg';
@forward 'typography';

0 comments on commit d3e8a2a

Please sign in to comment.