From 0317f91cee7d20a7f2dddd0c0892d94380145d72 Mon Sep 17 00:00:00 2001 From: Richard McCarthy Date: Mon, 7 Oct 2024 16:35:56 +0100 Subject: [PATCH] rename items summary param for compatibility with jinja --- 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 ++++---- 13 files changed, 58 insertions(+), 58 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 %}