Skip to content

Commit

Permalink
Merge pull request #436 from alphagov/update-warning-text-readme
Browse files Browse the repository at this point in the history
Update warning text README
  • Loading branch information
36degrees authored Jan 18, 2018
2 parents e685754 + f497542 commit 224961c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 9 deletions.
25 changes: 18 additions & 7 deletions src/components/warning-text/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Warning text
# Warning text

## Introduction

Use bold text with an exclamation icon if there are consequences - for example, a fine or prison sentence.
Use bold text with an exclamation icon if there are consequences - for example, a fine or prison sentence.

## Guidance

Expand All @@ -26,9 +26,8 @@ More information about when to use warning-text can be found on [GOV.UK Design S

#### Macro

{{ govukwarningText({
"classes": null,
"warningText": "You can be fined up to £5,000 if you don’t register.",
{{ govukWarningText({
"text": "You can be fined up to £5,000 if you don’t register.",
"iconFallbackText": "Warning"
}) }}

Expand Down Expand Up @@ -106,7 +105,19 @@ If you are using Nunjucks,then macros take the following arguments

<tr class="govuk-c-table__row">

<th class="govuk-c-table__header" scope="row">warningText</th>
<th class="govuk-c-table__header" scope="row">text</th>

<td class="govuk-c-table__cell ">string</td>

<td class="govuk-c-table__cell ">Yes</td>

<td class="govuk-c-table__cell ">The text next to the icon</td>

</tr>

<tr class="govuk-c-table__row">

<th class="govuk-c-table__header" scope="row">html</th>

<td class="govuk-c-table__cell ">string</td>

Expand Down Expand Up @@ -146,4 +157,4 @@ Guidelines can be found at [on our Github repository.](https://github.com/alphag

## License

MIT
MIT
2 changes: 1 addition & 1 deletion src/components/warning-text/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

{# componentName #}
{% block componentDescription %}
Use bold text with an exclamation icon if there are legal consequences - for example, a fine or prison sentence.
Use bold text with an exclamation icon if there are consequences - for example, a fine or prison sentence.
{% endblock %}
{# defaultAndVariants #}

Expand Down
1 change: 0 additions & 1 deletion src/components/warning-text/warning-text.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
variants:
- name: default
data:
classes:
text: You can be fined up to £5,000 if you don’t register.
iconFallbackText: Warning

0 comments on commit 224961c

Please sign in to comment.