Package Exports
- @times-components/gradient
- @times-components/gradient/dist/gradient.js
- @times-components/gradient/rnw
- @times-components/gradient/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/gradient) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Gradient
The gradient component wraps any children and adds a gradient background. The gradient's angle can be configured by the consumer of gradient. There are two exported components:
Gradient- used for image placeholders and loading screensOverlayGradient- developed for use when overlaying text over parts of an image
How to use
import Gradient, { OverlayGradient } from "@times-components/gradient";
// Works on it's own
<Gradient
degrees={90}
style={{
width: 200,
height: 200
}}>
</Gradient>
// Works with children
<OverlayGradient
degrees={90}
style={{
width: 200,
height: 200
}}>
<Text>Example text</Text>
</OverlayGradient>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 lintTesting
This package uses yarn (latest) to run unit tests on each platform with jest.
yarn test:webVisit the official storybook to see our available gradient templates.