diff --git a/src/stories/Blocks/event-page/EventPage.stories.tsx b/src/stories/Blocks/event-page/EventPage.stories.tsx index 34d2ceab4..c3a4dc2dc 100644 --- a/src/stories/Blocks/event-page/EventPage.stories.tsx +++ b/src/stories/Blocks/event-page/EventPage.stories.tsx @@ -109,3 +109,7 @@ export default { const Template: ComponentStory = (args) => ; export const Default = Template.bind({}); +export const withOutImage = Template.bind({}); +withOutImage.args = { + image: "", +}; diff --git a/src/stories/Library/image-credited/ImageCredited.stories.tsx b/src/stories/Library/image-credited/ImageCredited.stories.tsx index 23ab7da98..b4253695f 100644 --- a/src/stories/Library/image-credited/ImageCredited.stories.tsx +++ b/src/stories/Library/image-credited/ImageCredited.stories.tsx @@ -38,3 +38,7 @@ const Template: ComponentStory = (args) => ( ); export const Default = Template.bind({}); +export const withOutImage = Template.bind({}); +withOutImage.args = { + src: "", +}; diff --git a/src/stories/Library/image-credited/ImageCredited.tsx b/src/stories/Library/image-credited/ImageCredited.tsx index a001caab8..611d3f400 100644 --- a/src/stories/Library/image-credited/ImageCredited.tsx +++ b/src/stories/Library/image-credited/ImageCredited.tsx @@ -18,11 +18,17 @@ const ImageCredited: FC = ({ }) => { return (
- {alt} -
- {description} - {year} -
+ {src ? ( + <> + {alt} +
+ {description} + {year} +
+ + ) : ( +
+ )}
); }; diff --git a/src/stories/Library/image-credited/image-credited.scss b/src/stories/Library/image-credited/image-credited.scss index 10f7a7cec..f36581d14 100644 --- a/src/stories/Library/image-credited/image-credited.scss +++ b/src/stories/Library/image-credited/image-credited.scss @@ -8,3 +8,8 @@ display: flex; justify-content: space-between; } + +.image-credited__no-image { + aspect-ratio: 16 / 9; + @extend %identity-placeholder; +} diff --git a/src/styles/scss/tools/placeholder.scss b/src/styles/scss/tools/placeholder.scss index 1d4fa465d..3d94fab89 100644 --- a/src/styles/scss/tools/placeholder.scss +++ b/src/styles/scss/tools/placeholder.scss @@ -47,4 +47,9 @@ @include typography($typo__body-small); } +%identity-placeholder { + background-color: var(--tint-color-120); + border: $s-2xl solid $color__identity-primary; +} + // stylelint-enable plugin/stylelint-bem-namics