diff --git a/src/components/footer/_macro-options.md b/src/components/footer/_macro-options.md index 94878a1465..a37da2a4f5 100644 --- a/src/components/footer/_macro-options.md +++ b/src/components/footer/_macro-options.md @@ -19,11 +19,11 @@ | Name | Type | Required | Description | | ---- | ------ | --------------------------- | ----------------------------------------------------- | -| pre | string | true (unless `HTML` is set) | The text before the OGL link | -| url | string | true (unless `HTML` is set) | The URL for the HTML `href` attribute of the OGL link | -| text | string | true (unless `HTML` is set) | The text label for the OGL link | -| post | string | true (unless `HTML` is set) | The text after the OGL link | -| HTML | string | false | The alternative HTML for the OGL content | +| pre | string | true (unless `html` is set) | The text before the OGL link | +| url | string | true (unless `html` is set) | The URL for the HTML `href` attribute of the OGL link | +| text | string | true (unless `html` is set) | The text label for the OGL link | +| post | string | true (unless `html` is set) | The text after the OGL link | +| html | string | false | The alternative HTML for the OGL content | ## CopyrightDeclaration @@ -69,7 +69,7 @@ ## Logo -| Name | Type | Required | Description | -| --------- | -------------- | -------- | --------------------------------------------------------------------------------------- | -| logoImage | HTML or string | false | Any HTML to render an image for example embedded `` or ``. | -| logoUrl | string | false | Wraps the extra logo in a link. Set the URL for the HTML `href` attribute for the link. | +| Name | Type | Required | Description | +| --------- | ------ | -------- | --------------------------------------------------------------------------------------- | +| logoImage | string | false | HTML to render an image for example embedded `` or ``. | +| logoUrl | string | false | Wraps the extra logo in a link. Set the URL for the HTML `href` attribute for the link. | diff --git a/src/components/footer/_macro.njk b/src/components/footer/_macro.njk index 0d80ceaca8..64d44a4b82 100644 --- a/src/components/footer/_macro.njk +++ b/src/components/footer/_macro.njk @@ -140,8 +140,8 @@ "iconType": 'ogl' }) -}} - {% if params.oglLink.HTML %} - {{ params.oglLink.HTML | safe }} + {% if params.oglLink.html %} + {{ params.oglLink.html | safe }} {% elif params.oglLink %} {% from "components/external-link/_macro.njk" import onsExternalLink %} {% if params.lang == 'cy' %} diff --git a/src/components/footer/_macro.spec.js b/src/components/footer/_macro.spec.js index fd054a535c..edd7142e60 100644 --- a/src/components/footer/_macro.spec.js +++ b/src/components/footer/_macro.spec.js @@ -144,12 +144,12 @@ describe('macro: footer', () => { expect(iconsSpy.occurrences).toContainEqual(expect.objectContaining({ iconType: 'ogl' })); }); - it('renders raw HTML when `HTML` is provided', () => { + it('renders raw HTML when `html` is provided', () => { const $ = cheerio.load( renderComponent('footer', { oglLink: { ...params.oglLink, - HTML: 'Bold text.', + html: 'Bold text.', }, }), ); diff --git a/src/components/header/_macro-options.md b/src/components/header/_macro-options.md index aee369ce31..76837cfafd 100644 --- a/src/components/header/_macro-options.md +++ b/src/components/header/_macro-options.md @@ -23,8 +23,8 @@ | Name | Type | Required | Description | | ------------- | ----------------------- | -------- | ------------------------------------------------------------------------ | | classes | string | false | Classes to be added to the masthead logo | -| large | HTML | false | Any HTML to render an image for example embedded `` or `` | -| small | HTML | false | Optionally provide a version of the logo more suited to mobile viewports | +| large | string | false | HTML to render an image for example embedded `` or `` | +| small | string | false | Optionally provide a version of the logo more suited to mobile viewports | | multipleLogos | object`` | false | Allows for up to three logos to be used in the masthead | ## MultipleLogos @@ -37,18 +37,18 @@ ## Logo -| Name | Type | Required | Description | -| ----- | -------------- | -------- | ------------------------------------------------------------------------------------------------------------- | -| image | HTML or string | false | Any HTML to render an image for example embedded `` or ``. Use 'ONS Logo' for the default ONS icon. | -| url | string | false | Wraps the masthead logo in a link. Set the URL for the HTML `href` attribute for the link. | +| Name | Type | Required | Description | +| ----- | ------ | -------- | --------------------------------------------------------------------------------------------------------- | +| image | string | false | HTML to render an image for example embedded `` or ``. Use 'ONS Logo' for the default ONS icon. | +| url | string | false | Wraps the masthead logo in a link. Set the URL for the HTML `href` attribute for the link. | ## TitleLogo | Name | Type | Required | Description | | ------- | ------ | -------- | ------------------------------------------------------------------------ | | classes | string | false | Classes to be added to the masthead logo | -| large | HTML | true | Any HTML to render an image for example embedded `` or `` | -| small | HTML | false | Optionally provide a version of the logo more suited to mobile viewports | +| large | string | true | HTML to render an image for example embedded `` or `` | +| small | string | false | Optionally provide a version of the logo more suited to mobile viewports | ## ServiceLinks