From 4f74aa1b5d995a2df2972649d77552d924abd721 Mon Sep 17 00:00:00 2001 From: Andrew Hosgood Date: Fri, 22 Sep 2023 17:56:20 +0100 Subject: [PATCH] Add skip link properties to story --- .../components/skip-link/skip-link.stories.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/nationalarchives/components/skip-link/skip-link.stories.js b/src/nationalarchives/components/skip-link/skip-link.stories.js index 8d3520bb..240d6dda 100644 --- a/src/nationalarchives/components/skip-link/skip-link.stories.js +++ b/src/nationalarchives/components/skip-link/skip-link.stories.js @@ -2,6 +2,8 @@ import SkipLink from "./template.njk"; import macroOptions from "./macro-options.json"; const argTypes = { + text: { control: "text" }, + href: { control: "text" }, classes: { control: "text" }, attributes: { control: "object" }, }; @@ -17,13 +19,10 @@ export default { argTypes, }; -const Template = ({ classes, attributes }) => +const Template = ({ text, href, classes, attributes }) => `

To view the skip link component tab to this example, or click inside this example and press tab.

${SkipLink({ - params: { - classes, - attributes, - }, + params: { text, href, classes, attributes }, })}`; export const Standard = Template.bind({});