Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public componentDidUpdate(
prevProps: CSSBoxShadowProps,
prevState: CSSBoxShadowState
): void {
if (this.state !== prevState) {
const rgb: ColorRGBA64 = parseColorHexRGB(this.state.boxShadowColor);
const rgba: ColorRGBA64 = ColorRGBA64.fromObject({
r: rgb.r,
g: rgb.g,
b: rgb.b,
a: this.state.boxShadowOpacity,
});
const boxShadowArray: string[] = [
this.state.boxShadowOffsetX,
this.state.boxShadowOffsetY,
this.state.boxShadowBlurRadius,
rgba.toStringWebRGBA(),
];
this.props.onChange({
boxShadow: boxShadowArray.reduce(
(accum: string, current: string): string => {