@times-components/svgs

2.7.36 • Public • Published

SVGs

This package ensures a consistent API for SVGs that are used across Times Components. The web version relies on svgs. The native version provides its own set of components and utilises ART from react-native. Components available include G, Path, Polygon, Rect and Svg.

Differences

Opacity behaves differently on native and web SVGs. In web, fillOpacity and strokeOpacity are applied separately, but native only has one opacity prop that affects the opacity on both fill colours and stroke colours.

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

Future

SVGs could use their own showcase.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.7.36
    0
    • latest

Version History

Package Sidebar

Install

npm i @times-components/svgs

Weekly Downloads

320

Version

2.7.36

License

BSD-3-Clause

Unpacked Size

44.8 kB

Total Files

13

Last publish

Collaborators

  • marcincuber
  • newsuk
  • news-tools