Skip to content

Commit

Permalink
Rename summary component parameters (#3224)
Browse files Browse the repository at this point in the history
  • Loading branch information
precious-onyenaucheya-ons authored and rmccar committed Oct 9, 2024
1 parent 732da38 commit a1ee7e8
Show file tree
Hide file tree
Showing 12 changed files with 587 additions and 599 deletions.
16 changes: 8 additions & 8 deletions src/components/summary/example-summary-card-grouped.njk
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"rows": [
{
"title": "Are you John Doe?",
"items": [
"rowItems": [
{
"valueList": [
{
Expand All @@ -31,7 +31,7 @@
},
{
"title": "What's your date of birth?",
"items": [
"rowItems": [
{
"valueList": [
{
Expand All @@ -50,7 +50,7 @@
},
{
"title": "What is your sex?",
"items": [
"rowItems": [
{
"valueList": [
{
Expand All @@ -74,7 +74,7 @@
"rows": [
{
"title": "What is your country of birth?",
"items": [
"rowItems": [
{
"valueList": [
{
Expand All @@ -93,7 +93,7 @@
},
{
"title": "What passports do you hold?",
"items": [
"rowItems": [
{
"valueList": [
{
Expand All @@ -117,7 +117,7 @@
"rows": [
{
"title": "Have you completed an apprenticeship?",
"items": [
"rowItems": [
{
"valueList": [
{
Expand All @@ -136,7 +136,7 @@
},
{
"title": "Have you achieved a GCSE or equivalent qualification?",
"items": [
"rowItems": [
{
"valueList": [
{
Expand Down Expand Up @@ -280,7 +280,7 @@
"rows": [
{
"title": "What are your monthly household expenses?",
"items": [
"rowItems": [
{
"title": "Food",
"valueList": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"rows": [
{
"title": "For the period 1 May 2017 to 31 May 2017, what was the total turnover of Essential Enterprise Ltd?",
"items": [
"rowItems": [
{
"valueList": [
{
Expand Down
16 changes: 8 additions & 8 deletions src/components/summary/example-summary-grouped.njk
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"rows": [
{
"title": "Are you John Doe?",
"items": [
"rowItems": [
{
"valueList": [
{
Expand All @@ -32,7 +32,7 @@
},
{
"title": "What's your date of birth?",
"items": [
"rowItems": [
{
"valueList": [
{
Expand All @@ -51,7 +51,7 @@
},
{
"title": "What is your sex?",
"items": [
"rowItems": [
{
"valueList": [
{
Expand All @@ -75,7 +75,7 @@
"rows": [
{
"title": "What is your country of birth?",
"items": [
"rowItems": [
{
"valueList": [
{
Expand All @@ -94,7 +94,7 @@
},
{
"title": "What passports do you hold?",
"items": [
"rowItems": [
{
"valueList": [
{
Expand All @@ -118,7 +118,7 @@
"rows": [
{
"title": "Have you completed an apprenticeship?",
"items": [
"rowItems": [
{
"valueList": [
{
Expand All @@ -137,7 +137,7 @@
},
{
"title": "Have you achieved a GCSE or equivalent qualification?",
"items": [
"rowItems": [
{
"valueList": [
{
Expand Down Expand Up @@ -281,7 +281,7 @@
"rows": [
{
"title": "What are your monthly household expenses?",
"items": [
"rowItems": [
{
"title": "Food",
"valueList": [
Expand Down
138 changes: 68 additions & 70 deletions src/components/summary/example-summary-household.njk
Original file line number Diff line number Diff line change
@@ -1,75 +1,73 @@
{% from "components/summary/_macro.njk" import onsSummary %}

{{
onsSummary({
"classes": "ons-u-mb-l",
"summaries": [
{
"groups": [
{
"rows": [
{
"title": "Joe Bloggs (You)",
"items": [
{
"iconType": "person",
"actions": [
{
"text": "Change",
"visuallyHiddenText": "Change details for Joe Bloggs",
"url": "#0"
}
]
}
]
},
{
"title": "Barry Scott",
"items": [
{
"iconType": "person",
"actions": [
{
"text": "Change",
"visuallyHiddenText": "Change details for Barry Scott",
"url": "#0"
},
{
"text": "Remove",
"visuallyHiddenText": "Remove Barry Scott",
"url": "#0"
}
]
}
]
},
{
"title": "Wilhelmina Susannah Clementine-Smith",
"items": [
{
"iconType": "person",
"actions": [
{
"text": "Change",
"visuallyHiddenText": "Change details for Susan Gill",
"url": "#0"
},
{
"text": "Remove",
"visuallyHiddenText": "Remove Susan Gill",
"url": "#0"
}
]
}
]
}
],
"summaryLink": {
"text": "Add someone to this household",
"url": "#0",
"attributes": {
"data-qa": "add-item-link"
}
{{ onsSummary({
"classes": "ons-u-mb-l",
"summaries": [
{
"groups": [
{
"rows": [
{
"title": "Joe Bloggs (You)",
"rowItems": [
{
"iconType": "person",
"actions": [
{
"text": "Change",
"visuallyHiddenText": "Change details for Joe Bloggs",
"url": "#0"
}
]
}
]
},
{
"title": "Barry Scott",
"rowItems": [
{
"iconType": "person",
"actions": [
{
"text": "Change",
"visuallyHiddenText": "Change details for Barry Scott",
"url": "#0"
},
{
"text": "Remove",
"visuallyHiddenText": "Remove Barry Scott",
"url": "#0"
}
]
}
]
},
{
"title": "Wilhelmina Susannah Clementine-Smith",
"rowItems": [
{
"iconType": "person",
"actions": [
{
"text": "Change",
"visuallyHiddenText": "Change details for Susan Gill",
"url": "#0"
},
{
"text": "Remove",
"visuallyHiddenText": "Remove Susan Gill",
"url": "#0"
}
]
}
]
}
],
"summaryLink": {
"text": "Add someone to this household",
"url": "#0",
"attributes": {
"data-qa": "add-item-link"
}
}
]
Expand Down
Loading

0 comments on commit a1ee7e8

Please sign in to comment.