mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-24 09:28:31 +00:00
* 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
37 lines
1,009 B
JavaScript
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>
|
|
);
|
|
};
|