diff --git a/CHANGELOG.md b/CHANGELOG.md index d001cc24..8ba6cf3d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,11 +10,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - New accordion and details components added +- Card images can be loaded lazily with `lazyImage` ### Changed ### Deprecated ### Removed ### Fixed + +- Small images in hero components on smaller devices now fill the width of the component + ### Security ## [0.1.54](https://github.com/nationalarchives/tna-frontend/compare/v0.1.53...v0.1.54) - 2024-05-13 diff --git a/src/nationalarchives/components/card/card.stories.js b/src/nationalarchives/components/card/card.stories.js index c4bf195c..9da9d52c 100644 --- a/src/nationalarchives/components/card/card.stories.js +++ b/src/nationalarchives/components/card/card.stories.js @@ -16,6 +16,7 @@ const argTypes = { imageHeight: { control: { type: "number", min: 1 } }, imageType: { control: "text" }, imageSources: { control: "object" }, + lazyImage: { control: "boolean" }, label: { control: "text" }, labelColour: { control: "inline-radio", @@ -63,6 +64,7 @@ const Template = ({ imageHeight, imageType, imageSources, + lazyImage, label, labelColour, meta, @@ -91,6 +93,7 @@ const Template = ({ imageHeight, imageType, imageSources, + lazyImage, label, labelColour, meta, diff --git a/src/nationalarchives/components/card/fixtures.json b/src/nationalarchives/components/card/fixtures.json index e4d93a40..fd8528eb 100644 --- a/src/nationalarchives/components/card/fixtures.json +++ b/src/nationalarchives/components/card/fixtures.json @@ -94,6 +94,20 @@ }, "html": "
Card body
Card body
" + }, + "html": "Card body