1.2.15 • Published 5 years ago
material-gradient-generator v1.2.15
Material Gradient Generator
Intended use case is mainly for React when you need to iterate over items in a list and apply a soft, linear gradient to them, i.e. buttons or dashboard items.
Install the package:
npm i material-gradient-generator --save
Import the gradient genetator:
import { materialGradientGenerator } from "material-gradient-generator";
Use the generator! 🔥
const colourGen = new materialGradientGenerator(false, 500, 200, 2);
const nextColour = colourGen.NextColour();
// excludeRed?: boolean
// darkShade?: number
// lightShade?: number
// _step?: number
const colourGen = new materialGradientGenerator(false, 500, 200, 2);
const nextColour = colourGen.NextColour();
<button className='btn btn-light' style={{ margin: "5px", backgroundImage: `${nextColour}` }}
<i className='fa fa-free-code-camp'></i>
</button>
<button className='btn btn-light' style={{ margin: "5px", backgroundImage: `${nextColour}` }}
<i className='fa fa-diamond'></i>
</button>
<button className='btn btn-light' style={{ margin: "5px", backgroundImage: `${nextColour}` }}
<i className='fa fa-paper-plane'></i>
</button>
1.2.15
5 years ago
1.2.12
5 years ago
1.2.13
5 years ago
1.2.11
5 years ago
1.2.10
5 years ago
1.2.9
5 years ago
1.2.8
5 years ago
1.2.7
5 years ago
1.2.6
5 years ago
1.2.5
5 years ago
1.2.4
5 years ago
1.2.3
5 years ago
1.2.2
5 years ago
1.2.0
5 years ago
1.1.0
5 years ago
1.0.9
5 years ago
1.2.1
5 years ago
1.0.8
5 years ago
1.0.7
5 years ago
1.0.6
5 years ago
1.0.5
5 years ago
1.0.4
5 years ago
1.0.3
5 years ago
1.0.2
5 years ago
1.0.1
5 years ago
1.0.0
5 years ago