diff --git a/src/nationalarchives/components/card/card.stories.js b/src/nationalarchives/components/card/card.stories.js index aa05c351..70e3488a 100644 --- a/src/nationalarchives/components/card/card.stories.js +++ b/src/nationalarchives/components/card/card.stories.js @@ -64,7 +64,7 @@ Standard.args = { supertitle: "Card supertitle", title: "Card title", level: 3, - size: "l", + size: "m", }, href: "#", image: { @@ -92,7 +92,7 @@ Boxed.args = { supertitle: "Card supertitle", title: "Card title", level: 3, - size: "l", + size: "m", }, href: "#", image: { @@ -114,7 +114,7 @@ Accent.args = { supertitle: "Card supertitle", title: "Card title", level: 3, - size: "l", + size: "m", }, href: "#", image: { @@ -189,6 +189,36 @@ HorizontalBoxed.args = { classes: "tna-card--demo", }; +export const HorizontalAccent = Template.bind({}); +HorizontalAccent.args = { + heading: { + supertitle: "Card supertitle", + title: "Card title", + level: 3, + size: "l", + }, + image: { + src: "https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg", + alt: "The National Archives office", + width: 1996, + height: 1331, + }, + label: "New", + body: "
Card body
", + actions: [ + { + text: "Card action", + href: "#", + title: "Go and do the action", + icon: "calendar", + }, + ], + horizontal: true, + style: "accent", + htmlElement: "article", + classes: "tna-card--demo", +}; + const GridTemplate = ({ heading, href, diff --git a/src/nationalarchives/components/card/fixtures.json b/src/nationalarchives/components/card/fixtures.json index 9af9f8a6..9e7401d5 100644 --- a/src/nationalarchives/components/card/fixtures.json +++ b/src/nationalarchives/components/card/fixtures.json @@ -10,7 +10,7 @@ }, "body": "Card body
" }, - "html": "Card body
Card body
Card body
" }, - "html": "Card supertitle
Card body
Card body
Card body
" }, - "html": "Card body
Card body
Card body
" }, - "html": "Card body
Card body
Card body
Card body
Card body
" }, - "html": "Card body
Card body
Card body
" }, - "html": "Card body
" }, - "html": "Card body
Card body
Card body
", "style": "boxed" }, - "html": "Card body
Card body
Card body
", "style": "accent" }, - "html": "Card body
Card body
Card body
", "style": "foobar" }, - "html": "Card body
Card body
Card body
", "classes": "card__test-class" }, - "html": "Card body
Card body
Card body
Card body
{{ params.heading.supertitle }}
-{{ params.text }}
diff --git a/src/nationalarchives/stories/utilities/typography/heading-groups.stories.js b/src/nationalarchives/stories/utilities/typography/heading-groups.stories.js index 9afac339..0b3fa2a8 100644 --- a/src/nationalarchives/stories/utilities/typography/heading-groups.stories.js +++ b/src/nationalarchives/stories/utilities/typography/heading-groups.stories.js @@ -3,6 +3,7 @@ const argTypes = { title: { control: "text" }, level: { control: "number", min: 1, max: 6, step: 1 }, size: { control: "radio", options: ["m", "l", "xl"] }, + singleSentence: { control: "boolean" }, }; export default { @@ -15,13 +16,30 @@ const Template = ({ title, level = 3, size = "l", -}) => ` + singleSentence, +}) => + singleSentence + ? ` +${supertitle}