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..1944ad94b 100644 --- a/src/stories/Library/image-credited/ImageCredited.tsx +++ b/src/stories/Library/image-credited/ImageCredited.tsx @@ -1,5 +1,4 @@ import clsx from "clsx"; -import { FC } from "react"; type ImageCreditedProps = { src: string; @@ -9,7 +8,7 @@ type ImageCreditedProps = { className?: string; }; -const ImageCredited: FC = ({ +const ImageCredited: React.FC = ({ src, alt = "", description, @@ -18,11 +17,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..41c2b414b 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-background; +} diff --git a/src/styles/scss/shared.scss b/src/styles/scss/shared.scss index 1866fd7ab..190bccde7 100644 --- a/src/styles/scss/shared.scss +++ b/src/styles/scss/shared.scss @@ -85,3 +85,8 @@ display: inline; margin: 0 0 -5px 5px; } + +%identity-background { + background-color: var(--tint-color-120); + border: $s-2xl solid $color__identity-primary; +}