@times-components/article-image

7.17.2 • Public • Published

Article Image

Article content often includes images which are defined in the article image package. Article images are configured to be one of several different types which dictates the general layout, particularly in relation to their accompanying caption.

  • primary - main image of the article, running full width
  • secondary - any secondary article image, generally half width, with captions next to the image
  • inline - images that allow content to wrap around them

Ratio configuration controls the size of the image, and whether it is portrait or landscape.

Contributing

Please read CONTRIBUTING.md before contributing to this package

Running the code

Please see our main README.md to get the project running locally

Development

The code can be formatted and linted in accordance with the agreed standards.

yarn fmt
yarn lint

Testing

This package uses yarn (latest) to run unit tests on each platform with jest.

yarn test:web

Visit the official storybook to see our available article image templates.

Package Sidebar

Install

npm i @times-components/article-image

Weekly Downloads

4,174

Version

7.17.2

License

BSD-3-Clause

Unpacked Size

231 kB

Total Files

18

Last publish

Collaborators

  • marcincuber
  • newsuk
  • news-tools