css – React inline style linear-gradient

I cant deal with backgroundImage/background:linear-gradient with react.

Current variables:

const satBg = {
 backgroundImage: 'linear-gradient(to right, hsl(128, 128, 128), hsl('+this.state.hue+', '+this.state.sat+', '+this.state.lum+'))' }

const lumBg = {
 backgroundImage: 'linear-gradient(to right, hsl(0, 0, 0), hsl('+this.state.hue+', '+this.state.sat+', '+this.state.lum+'),hsl('+this.state.hue+', '+this.state.sat+', 100%))' }

See this codepen

I m actually dealing with some css tricks but looks bad

Any solution ?


Source link

Latest articles

Related articles

Leave a reply

Please enter your comment!
Please enter your name here