Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support lowercase html arg #1090

Merged
merged 2 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

- Fix appearance of disabled warning buttons ([Issue 1034]([https://github.com/nhsuk/nhsuk-service-manual-community-backlog/issues/1034]))
- Fix reverse button text colour ([PR 1080]([https://github.com/nhsuk/nhsuk-frontend/pull/1080]))
- Fix details component requiring html param in uppercase ([PR 1090](https://github.com/nhsuk/nhsuk-frontend/pull/1090), [Issue 1089](https://github.com/nhsuk/nhsuk-frontend/issues/1089))

## 9.1.0 - 4 November 2024

Expand Down
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>
Loading