@times-components/article-flag

2.12.7 • Public • Published

Article Flag

Article flags are attached to an article like a label to indicate the article's status. There are some common statuses that are exported as components from this package, such as "new", "updated", "exclusive" or "sponsored", but the default component also takes a bespoke title prop to enable a bespoke status.

The flags are currently added to an article by an editor using the CMS. These flags "expire" server side.

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 flag templates.

Package Sidebar

Install

npm i @times-components/article-flag

Weekly Downloads

191

Version

2.12.7

License

BSD-3-Clause

Unpacked Size

141 kB

Total Files

12

Last publish

Collaborators

  • marcincuber
  • newsuk
  • news-tools