Package Exports
- @times-components/svgs
- @times-components/svgs/dist/index.js
- @times-components/svgs/rnw
- @times-components/svgs/rnw.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@times-components/svgs) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
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.