Renders a gradient background
npm install @times-components/gradientThe 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 screens
- OverlayGradient - developed for use when overlaying text over parts of an
image
``js
import Gradient, { OverlayGradient } from "@times-components/gradient";
// Works on it's own
style={{
width: 200,
height: 200
}}>
// Works with children
style={{
width: 200,
height: 200
}}>
`
Please read CONTRIBUTING.md before contributing to this
package
Please see our main README.md to get the project running locally
The code can be formatted and linted in accordance with the agreed standards.
``
yarn fmt
yarn lint
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 gradient templates.