Skip to content

Commit

Permalink
Change primaryLinks to use href and text
Browse files Browse the repository at this point in the history
Change the primaryLinks in the Header component to use `href` and `text` param names instead of `url` and `label`.

This improves consistency with other components.

The previous param names are still supported for backwards-compatibility (but could be dropped in future?)
  • Loading branch information
frankieroberto committed Nov 27, 2024
1 parent 9ab62ce commit 2e3059a
Show file tree
Hide file tree
Showing 9 changed files with 125 additions and 125 deletions.
20 changes: 10 additions & 10 deletions app/components/all.njk
Original file line number Diff line number Diff line change
Expand Up @@ -39,24 +39,24 @@
"search": true,
"primaryLinks": [
{
"url" : "https://www.nhs.uk/conditions",
"label" : "Health A-Z"
href: "https://www.nhs.uk/conditions",
text: "Health A-Z"
},
{
'url' : 'https://www.nhs.uk/live-well/',
'label' : 'Live Well'
href: 'https://www.nhs.uk/live-well/',
text: 'Live Well'
},
{
'url' : 'https://www.nhs.uk/conditions/social-care-and-support/',
'label' : 'Care and support'
href: 'https://www.nhs.uk/conditions/social-care-and-support/',
text: 'Care and support'
},
{
'url' : 'https://www.nhs.uk/news/',
'label' : 'Health news'
href: 'https://www.nhs.uk/news/',
text: 'Health news'
},
{
'url' : 'https://www.nhs.uk/service-search',
'label' : 'Services near you'
href: 'https://www.nhs.uk/service-search',
text: 'Services near you'
}
]
})
Expand Down
20 changes: 10 additions & 10 deletions app/components/header/header-navigation.njk
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,24 @@
}
},
{
'url' : 'https://www.nhs.uk/live-well/',
'label' : 'Live Well'
href: 'https://www.nhs.uk/live-well/',
text: 'Live Well'
},
{
'url' : 'https://www.nhs.uk/mental-health/',
'label' : 'Mental health'
href: 'https://www.nhs.uk/mental-health/',
text: 'Mental health'
},
{
'url' : 'https://www.nhs.uk/conditions/social-care-and-support/',
'label' : 'Care and support'
href: 'https://www.nhs.uk/conditions/social-care-and-support/',
text: 'Care and support'
},
{
'url' : 'https://www.nhs.uk/pregnancy/',
'label' : 'Pregnancy'
href: 'https://www.nhs.uk/pregnancy/',
text: 'Pregnancy'
},
{
'url' : 'https://www.nhs.uk/nhs-services/',
'label' : 'NHS services'
href: 'https://www.nhs.uk/nhs-services/',
text: 'NHS services'
}
]
})
Expand Down
20 changes: 10 additions & 10 deletions app/components/header/header-org-white-nav.njk
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,24 @@
},
"primaryLinks": [
{
"url" : "#",
"label" : "Your hospital visit"
href: "#",
text: "Your hospital visit"
},
{
'url' : '#',
'label' : 'Wards and departments'
href: '#',
text: 'Wards and departments'
},
{
'url' : '#',
'label' : 'Conditions and treatments'
href: '#',
text: 'Conditions and treatments'
},
{
'url' : '#',
'label' : 'Our people'
href: '#',
text: 'Our people'
},
{
'url' : '#',
'label' : 'Our research'
href: '#',
text: 'Our research'
}
],
"search": {
Expand Down
20 changes: 10 additions & 10 deletions app/components/header/header-org-white.njk
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,24 @@
},
"primaryLinks": [
{
"url" : "#",
"label" : "Your hospital visit"
href: "#",
text: "Your hospital visit"
},
{
'url' : '#',
'label' : 'Wards and departments'
href: '#',
text: 'Wards and departments'
},
{
'url' : '#',
'label' : 'Conditions and treatments'
href: '#',
text: 'Conditions and treatments'
},
{
'url' : '#',
'label' : 'Our people'
href: '#',
text: 'Our people'
},
{
'url' : '#',
'label' : 'Our research'
href: '#',
text: 'Our research'
}
],
"search": {
Expand Down
20 changes: 10 additions & 10 deletions app/components/header/header-org.njk
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,24 @@
},
"primaryLinks": [
{
"url" : "#",
"label" : "Your hospital visit"
href: "#",
text: "Your hospital visit"
},
{
'url' : '#',
'label' : 'Wards and departments'
href: '#',
text: 'Wards and departments'
},
{
'url' : '#',
'label' : 'Conditions and treatments'
href: '#',
text: 'Conditions and treatments'
},
{
'url' : '#',
'label' : 'Our people'
href: '#',
text: 'Our people'
},
{
'url' : '#',
'label' : 'Our research'
href: '#',
text: 'Our research'
}
],
"search": {
Expand Down
16 changes: 8 additions & 8 deletions app/components/header/header-service-name-with-nav.njk
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,24 @@
},
"primaryLinks": [
{
"url" : "#",
"label" : "Standards and technology"
href: "#",
text: "Standards and technology"
},
{
'url' : '#',
'label' : 'Design system'
href: '#',
text: 'Design system'
},
{
'url' : '#',
'label' : 'Content style guide'
text: 'Content style guide'
},
{
'url' : '#',
'label' : 'Accessibility'
text: 'Accessibility'
},
{
'url' : '#',
'label' : 'Community and contribution'
href: '#',
text: 'Community and contribution'
}
]
})
Expand Down
20 changes: 10 additions & 10 deletions app/components/header/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,28 @@
"search": true,
"primaryLinks": [
{
"url" : "https://www.nhs.uk/conditions",
"label" : "Health A-Z"
href: "https://www.nhs.uk/conditions",
text: "Health A-Z"
},
{
'url' : 'https://www.nhs.uk/live-well/',
'label' : 'Live Well'
href: 'https://www.nhs.uk/live-well/',
text: 'Live Well'
},
{
'url' : 'https://www.nhs.uk/mental-health/',
'label' : 'Mental health'
href: 'https://www.nhs.uk/mental-health/',
text: 'Mental health'
},
{
'url' : 'https://www.nhs.uk/conditions/social-care-and-support/',
'label' : 'Care and support'
text: 'Care and support'
},
{
'url' : 'https://www.nhs.uk/pregnancy/',
'label' : 'Pregnancy'
text: 'Pregnancy'
},
{
'url' : 'https://www.nhs.uk/nhs-services/',
'label' : 'NHS services'
href: 'https://www.nhs.uk/nhs-services/',
text: 'NHS services'
}
]
}) }}
Expand Down
Loading

0 comments on commit 2e3059a

Please sign in to comment.