From 11cda717d6c84086799bdfd54ec6907e478d3316 Mon Sep 17 00:00:00 2001 From: rmccar <42928680+rmccar@users.noreply.github.com> Date: Tue, 8 Oct 2024 09:33:41 +0100 Subject: [PATCH] Rename items summary param for compatibility with Jinja (#3382) --- src/components/summary/_macro-options.md | 2 +- src/components/summary/_macro.njk | 4 ++-- src/components/summary/_macro.spec.js | 12 +++++------ .../summary/example-summary-card-grouped.njk | 20 +++++++++---------- .../summary/example-summary-grouped-total.njk | 6 +++--- .../example-summary-grouped-with-errors.njk | 8 ++++---- .../summary/example-summary-grouped.njk | 20 +++++++++---------- .../summary/example-summary-household.njk | 6 +++--- .../summary/example-summary-hub-minimal.njk | 8 ++++---- .../summary/example-summary-hub.njk | 16 +++++++-------- .../summary/example-summary-multiple.njk | 2 +- .../summary/example-summary-no-action.njk | 4 ++-- src/components/summary/example-summary.njk | 8 ++++---- .../hub-and-spoke/example-hub-complete.njk | 12 +++++------ src/patterns/hub-and-spoke/example-hub.njk | 12 +++++------ .../hub-and-spoke/example-spoke-summary.njk | 12 +++++------ 16 files changed, 76 insertions(+), 76 deletions(-) diff --git a/src/components/summary/_macro-options.md b/src/components/summary/_macro-options.md index 5a2d6a51f4..31ec6ecb60 100644 --- a/src/components/summary/_macro-options.md +++ b/src/components/summary/_macro-options.md @@ -26,7 +26,7 @@ | Name | Type | Required | Description | | ------------ | ----------------------- | -------- | ------------------------------------------------------------------- | | id | string | false | The HTML `id` of the row | -| items | Array`` | true | An array of [items for the row](#summaryrowitem) | +| itemsList | Array`` | true | An array of [items for the row](#summaryrowitem) | | title | string | false | The title for the row | | error | boolean | false | Set to “true” display an [error](/components/error) on a row | | errorMessage | string | false | The error message for the row | diff --git a/src/components/summary/_macro.njk b/src/components/summary/_macro.njk index 72e21b523c..5a8466ceb8 100644 --- a/src/components/summary/_macro.njk +++ b/src/components/summary/_macro.njk @@ -37,13 +37,13 @@ {% if row.errorMessage %}
{{ row.errorMessage }}
{% endif %} - {% if row.items | length > 1 and row.title %} + {% if row.itemsList | length > 1 and row.title %}
{{- row.title -}}
{% endif %} - {% for item in row.items %} + {% for item in row.itemsList %}