Skip to content

Commit 4135bcb

Browse files
Merge pull request #3533 from department-of-veterans-affairs/fix-minimal-header-guidance
Adds an example link and removes Code usage table which was broken on this page.
2 parents 0ba92ab + b1a3df0 commit 4135bcb

File tree

2 files changed

+22
-17
lines changed

2 files changed

+22
-17
lines changed

src/_components/header/minimal.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ has-parent: /components/header/
66
contributors: Ben Brasso (Agile 6), Ya-ching Tsao (CivicActions), Zach Park (Agile 6), Kristen McConnell (Ad Hoc)
77
intro-text: The minimal header can be used when navigating away would prevent the user from easily accomplishing their main task.
88
figma-link: https://www.figma.com/file/JDFpGLIojfuQwANXScQjqe/VADS-Example-Library?type=design&node-id=988%3A1384&mode=design&t=jMcVWkPlFhZu3RTh-1
9+
example-link: https://staging.va.gov/mock-form-minimal-header/
910
status: use-with-caution-candidate
1011
web-component: va-header-minimal
1112
anchors:
1213
- anchor: Examples
1314
- anchor: Usage
14-
- anchor: Code usage
1515
- anchor: Content considerations
1616
- anchor: Component checklist
1717
---
@@ -22,6 +22,10 @@ anchors:
2222

2323
{% include storybook-preview.html story="components-va-header-minimal--default" link_text=page.web-component %}
2424

25+
<a class="vads-c-action-link--blue" href="{{ page.example-link }}">
26+
View an example
27+
</a>
28+
2529
### With Subheader
2630

2731
{% include storybook-preview.html story="components-va-header-minimal--with-subheader" link_text="View va-header-minimal with subheader variation" %}
@@ -46,8 +50,6 @@ anchors:
4650

4751
* **At the top of the page.** The minimal header appears at the top of the page.
4852

49-
{% include component-docs.html component_name=page.web-component %}
50-
5153
## Content considerations
5254

5355
* For form titles:

src/_includes/component-docs.html

+17-14
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
{% for component in site.data.component-docs.components %} {% if component.tag
2-
== include.component_name %}
3-
{% if component.props != empty or component.events != empty %}
1+
{% for component in site.data.component-docs.components %}
2+
{% if component.tag == include.component_name %}
3+
{% if component.props != empty or component.events != empty %}
44
<h2 id="code-usage">Code usage</h2>
5-
{% if component.props != empty %}
5+
{% if component.props != empty %}
66
<h3>Attributes and Properties</h3>
77
<table>
88
<tr>
@@ -13,40 +13,43 @@ <h3>Attributes and Properties</h3>
1313
<th><strong>Description</strong></th>
1414
</tr>
1515
<div>
16-
{% for prop in component.props %}
16+
{% for prop in component.props %}
1717
<tr>
1818
<th><code class="code vads-u-border--1px vads-u-border-color--gray-light">{{ prop.name }}</code></th>
1919
<th><code class="code vads-u-border--1px vads-u-border-color--gray-light">{{ prop.attr }}</code></th>
2020
<th>{% if prop.type %}<code class="code vads-u-border--1px vads-u-border-color--gray-light">{{ prop.type }}</code>{% endif %}</th>
2121
<th>{% if prop.default %}<code class="code vads-u-border--1px vads-u-border-color--gray-light">{{ prop.default }}</code>{% endif %}</th>
2222
<th>{{ prop.docs }}</th>
2323
</tr>
24-
{% endfor %}
24+
{% endfor %}
2525
</div>
2626
</table>
27-
{% endif %}
27+
{% endif %}
2828

29-
{% if component.events != empty %}
29+
{% if component.events != empty %}
3030
<h3>Events</h3>
3131
<table>
3232
<tr>
3333
<th><strong>Name</strong></th>
3434
<th><strong>Description</strong></th>
3535
</tr>
3636
<div>
37-
{% for event in component.events %}
37+
{% for event in component.events %}
3838
<tr>
3939
<th><code class="code vads-u-border--1px vads-u-border-color--gray-light">{{ event.event }}</code></th>
4040
<th>{{ event.docs }}</th>
4141
</tr>
42-
{% endfor %} {% for listener in component.listeners %} {% assign docs =
43-
component.docsTags | where: "name", listener.event %}
42+
{% endfor %}
43+
{% for listener in component.listeners %}
44+
{% assign docs = component.docsTags | where: "name", listener.event %}
4445
<tr>
4546
<th><code class="code vads-u-border--1px vads-u-border-color--gray-light">{{ listener.event }}</code></th>
4647
<th>{% for doc in docs %} {{ doc.text }} {% endfor %}</th>
4748
</tr>
48-
{% endfor %}
49+
{% endfor %}
4950
</div>
5051
</table>
51-
{% endif %}
52-
{% endif %} {% endif %} {% endfor %}
52+
{% endif %}
53+
{% endif %}
54+
{% endif %}
55+
{% endfor %}

0 commit comments

Comments
 (0)