Skip to content

Commit

Permalink
support lowercase html arg
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardhorsford committed Dec 3, 2024
1 parent 272b562 commit 9a6a768
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/components/details/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

{{ details({
"text": "Where can I find my NHS number?",
"HTML": "
"html": "
<p>An NHS number is a 10 digit number, like 485 777 3456.</p>
<p>You can find your NHS number on any document sent to you by the NHS. This may include:</p>
<ul>
Expand Down
4 changes: 2 additions & 2 deletions packages/components/details/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ For this component to be accessible and compatible with older browsers, include
{{ details({
"text": "Where can I find my NHS number?",
"HTML": "
"html": "
<p>An NHS number is a 10 digit number, like 485 777 3456.</p>
<p>You can find your NHS number on any document sent to you by the NHS. This may include:</p>
<ul>
Expand Down Expand Up @@ -259,7 +259,7 @@ The details Nunjucks macro takes the following arguments:
| Name | Type | Required | Description |
| ---------- | ------- | -------- | --------------------------------------------------------------------------------------- |
| text | string | Yes | Text to be displayed on the expander component. |
| HTML | string | Yes | HTML content to be displayed within the expander component |
| html | string | Yes | HTML content to be displayed within the expander component |
| id | string | false | Id to add to the details element. |
| open | boolean | false | If true, details element will be expanded. |
| classes | string | No | Optional additional classes to add to the anchor tag. Separate each class with a space. |
Expand Down
3 changes: 2 additions & 1 deletion packages/components/details/template.njk
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
</span>
</summary>
<div class="nhsuk-details__text">
{{- params.HTML | safe }}
{# params.HTML supported for backwards compatibility - see issue #1089 #}
{{- (params.html or params.HTML) | safe }}
</div>
</details>

0 comments on commit 9a6a768

Please sign in to comment.