Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/GSA/sam-styles
Browse files Browse the repository at this point in the history
  • Loading branch information
thomastighe committed Mar 25, 2019
2 parents 21817dd + 6535f15 commit 71e57d8
Show file tree
Hide file tree
Showing 15 changed files with 219 additions and 117 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ npm start

Then, visit [http://localhost:3000/](http://localhost:3000/) to see sam-styles in action.

_**Optional**: To re-build when CSS changes are made, run the following command from the project directory in a separate terminal window:_
To re-build when CSS changes are made, run the following command from the project directory in a separate terminal window:
```sh
npm run watch
npm run prod
```
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<button class="usa-nav__close"><img src="{{ uswds.path }}/img/close.svg" alt="close"></button>
<button class="usa-nav__close"><img src="{{ '/dist/img/close.svg' | path }}" alt="close"></button>
<ul class="usa-nav__primary usa-accordion">
{%- for link in nav.links -%}
<li class="usa-nav__primary-item">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
label: Primary (header)
# preview: '@uswds-header'

context:
nav:
search: false
links:
- text: Current section
is_current: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
label: Secondary (header)
# preview: '@uswds-header'

context:
nav:
search: true
links:
- text: Secondary link
- text: Another secondary link
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{%- macro nav_list(links, subclass) -%}
{%- for item in links -%}
<li class="usa-sidenav-item">
<li class="usa-sidenav__item">
<a href="{{ item.href }}"{% if item.current %} class="usa-current"{% endif %}>{{ item.text }}</a>
{%- if item.links -%}
<ul class="{{ subclass }}">
Expand All @@ -13,6 +13,6 @@

<nav>
<ul class="usa-sidenav">
{{ nav_list(sidenav.links, 'usa-sidenav-sublist') }}
{{ nav_list(sidenav.links, 'usa-sidenav__sublist') }}
</ul>
</nav>
8 changes: 3 additions & 5 deletions src/components/labels/labels--chip.njk
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<h3>Chip</h3>

<span class="{{ label.classes }}">Normal</span>

<span class="sam label">
Normal with icon
<button class="sam button tertiary">
<span class="sam-tag sam-tag--chip">
Normal with close icon
<button class="sam-tag__close">
<span class="fas fa-times" aria-hidden="true"></span>
</button>
</span>
2 changes: 1 addition & 1 deletion src/components/labels/labels.config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ variants:
label: Chip
context:
label:
classes: "sam label"
classes: "sam-tag sam-tag--chip"
Loading

0 comments on commit 71e57d8

Please sign in to comment.