11import { default as Progress } from "antd/es/progress" ;
22import { styleControl } from "comps/controls/styleControl" ;
3- import { ProgressStyle , ProgressStyleType , heightCalculator , widthCalculator } from "comps/controls/styleControlConstants" ;
3+ import { CircleProgressStyle , CircleProgressType , heightCalculator , widthCalculator } from "comps/controls/styleControlConstants" ;
44import styled , { css } from "styled-components" ;
55import { Section , sectionNames } from "lowcoder-design" ;
66import { numberExposingStateControl } from "../controls/codeStateControl" ;
@@ -14,33 +14,38 @@ import { EditorContext } from "comps/editorState";
1414
1515// TODO: after Update of ANTd, introduce Size attribute to ProgressCircle
1616
17- const getStyle = ( style : ProgressStyleType ) => {
17+ const getStyle = ( style : CircleProgressType ) => {
1818 return css `
1919 width : ${ widthCalculator ( style . margin ) } ;
2020 height : ${ heightCalculator ( style . margin ) } ;
2121 margin : ${ style . margin } ;
2222 padding : ${ style . padding } ;
23+ border-radius : ${ style . radius } ;
2324 .ant-progress-text {
24- color : ${ style . text } ;
25+ color : ${ style . text } !important ;
26+ font-family : ${ style . fontFamily } ;
27+ font-style : ${ style . fontStyle } ;
28+ font-size : ${ style . textSize } !important ;
29+ font-weight : ${ style . textWeight } ;
2530 }
2631 .ant-progress-circle-trail {
2732 stroke : ${ style . track } ;
2833 }
2934 .ant-progress-inner .ant-progress-circle-path {
30- stroke : ${ style . fill } ;
35+ stroke : ${ style . fill } !important ;
3136 }
3237 & .ant-progress-status-success {
3338 .ant-progress-inner .ant-progress-circle-path {
34- stroke : ${ style . success } ;
39+ stroke : ${ style . success } !important ;
3540 }
3641 .ant-progress-text {
37- color : ${ style . success } ;
42+ color : ${ style . success } !important ;
3843 }
3944 }
4045 ` ;
4146} ;
4247
43- export const StyledProgressCircle = styled ( Progress ) < { $style : ProgressStyleType } > `
48+ export const StyledProgressCircle = styled ( Progress ) < { $style : CircleProgressType } > `
4449 width: 100%;
4550 height: 100%;
4651 padding: 2px;
@@ -59,7 +64,8 @@ export const StyledProgressCircle = styled(Progress)<{ $style: ProgressStyleType
5964let ProgressCircleTmpComp = ( function ( ) {
6065 const childrenMap = {
6166 value : numberExposingStateControl ( "value" , 60 ) ,
62- style : styleControl ( ProgressStyle ) ,
67+ // borderRadius property hidden as it's not valid for progress circle
68+ style : styleControl ( CircleProgressStyle ) ,
6369 } ;
6470 return new UICompBuilder ( childrenMap , ( props ) => {
6571 return (
0 commit comments