diff --git a/docs/_components/example/_example.scss b/docs/_components/example/_example.scss
index 69fcc1f..4da9402 100644
--- a/docs/_components/example/_example.scss
+++ b/docs/_components/example/_example.scss
@@ -15,7 +15,7 @@
.app-example__tabs {
// stylelint-disable selector-max-id
- .govuk-tabs__panel#preview {
+ .govuk-tabs__panel[id$="-preview"] {
background: govuk-colour("light-grey");
padding: 0;
}
diff --git a/docs/_components/example/template.njk b/docs/_components/example/template.njk
index 3ee55d8..03438a0 100644
--- a/docs/_components/example/template.njk
+++ b/docs/_components/example/template.njk
@@ -3,11 +3,11 @@
{%- set nunjucksHtml -%}
```js
-{{ getNunjucksCode(params.component) }}
+{{ getNunjucksCode(params.example) }}
```
{%- endset -%}
-{%- set examplePath = "/examples/" + params.component -%}
+{%- set examplePath = "/examples/" + params.example -%}
{%- set previewHtml -%}
@@ -20,13 +20,13 @@
classes: "app-example__tabs",
items: [{
label: "Preview",
- id: "preview",
+ id: params.example + "-preview",
panel: {
html: previewHtml
}
}, {
label: "Nunjucks",
- id: "nunjucks",
+ id: params.example + "-nunjucks",
panel: {
html: nunjucksHtml
}
diff --git a/docs/autocomplete.md b/docs/autocomplete.md
index fa7cbfa..4a606c2 100644
--- a/docs/autocomplete.md
+++ b/docs/autocomplete.md
@@ -8,7 +8,7 @@ description: Help users find and select from a number of options.
{% from "example/macro.njk" import appExample %}
{{ appExample({
- component: "autocomplete"
+ example: "autocomplete"
}) }}
This component implements the [Accessible autocomplete pattern](https://github.com/alphagov/accessible-autocomplete) to enhance a fixed list of options provided by a `