ToolJet/frontend/src/Editor/Components/CirularProgressbar.jsx
Kiran Ashok 4267027465
Bugfix :: Box shadow is getting applied to the surrounding box (#6802)
* feat :: temp commit added box shadow for freq used components

* fix :: box shadow for all components

* cleanup

* review :: changes , sending boz shadow with styles

* fix :: apply box shadow to the item instead of container

* fix :: daterange picker shadows
2023-06-29 15:14:05 +05:30

37 lines
1,009 B
JavaScript

import React from 'react';
import { CircularProgressbar } from 'react-circular-progressbar';
import 'react-circular-progressbar/dist/styles.css';
export const CircularProgressBar = function CircularProgressBar({ height, properties, styles, dataCy }) {
const { text, progress } = properties;
const { visibility, color, textColor, textSize, strokeWidth, counterClockwise, circleRatio, boxShadow } = styles;
const computedStyles = {
display: visibility ? '' : 'none',
boxShadow,
};
return (
<div style={computedStyles} data-cy={dataCy}>
<CircularProgressbar
value={progress}
text={text}
styles={{
root: {
height: height,
},
path: {
stroke: color,
},
text: {
fill: textColor,
fontSize: textSize,
},
}}
strokeWidth={strokeWidth}
counterClockwise={counterClockwise}
circleRatio={circleRatio}
/>
</div>
);
};