Skip to content
This repository has been archived by the owner on Mar 3, 2022. It is now read-only.

guardian/image-rendering

Repository files navigation

image-rendering

⚠️ Deprecated ⚠️: This functionality has been migrated to the DCR/AR mono-repo: https://github.com/guardian/dotcom-rendering.

Handles parsing images from CAPI and rendering them in the *-rendering projects

Components

BodyImage

This used for images in the body of articles.

<BodyImage
    image={Image}
    format={Format}
    supportsDarkMode={boolean}
    lightbox={Option<Lightbox>}
    caption={Option<ReactNode>}
/>

FigCaption

<FigCaption
    format={Format}
    supportsDarkMode={boolean}
    children={Option<ReactNode>}
/>

Img

Lowest-level implementation of a responsive image.

<Img
    image={Image}
    sizes={Sizes}
    className={Option<SerializedStyles>}
    format={Format}
    supportsDarkMode={boolean}
    lightbox={Option<Lightbox>}
/>

Storybook

You can get storybook to run locally by running:

npm run storybook