From 1a8efdd26ed63bd01ffe323c401872659df8a3ba Mon Sep 17 00:00:00 2001 From: Jorge Miranda Date: Tue, 8 Oct 2024 10:34:34 +0200 Subject: [PATCH 1/2] Progress bar border radius property --- .../mock-components/front-components/progressbar-shape.tsx | 6 +++--- src/pods/canvas/canvas.model.ts | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/common/components/mock-components/front-components/progressbar-shape.tsx b/src/common/components/mock-components/front-components/progressbar-shape.tsx index af669d0a..73e07cbe 100644 --- a/src/common/components/mock-components/front-components/progressbar-shape.tsx +++ b/src/common/components/mock-components/front-components/progressbar-shape.tsx @@ -31,7 +31,7 @@ export const ProgressBarShape = forwardRef((props, ref) => { ); const { width: restrictedWidth, height: restrictedHeight } = restrictedSize; - const { progress } = useShapeProps(otherProps, BASIC_SHAPE); + const { progress, borderRadius } = useShapeProps(otherProps, BASIC_SHAPE); const progressWidth = useMemo( () => (progress / 100) * restrictedWidth, @@ -53,7 +53,7 @@ export const ProgressBarShape = forwardRef((props, ref) => { y={0} width={restrictedWidth} height={restrictedHeight} - cornerRadius={10} + cornerRadius={borderRadius} stroke="black" strokeWidth={2} fill="white" @@ -65,7 +65,7 @@ export const ProgressBarShape = forwardRef((props, ref) => { y={0} width={progressWidth} height={restrictedHeight} - cornerRadius={10} + cornerRadius={borderRadius} stroke="black" strokeWidth={2} fill="lightgrey" diff --git a/src/pods/canvas/canvas.model.ts b/src/pods/canvas/canvas.model.ts index 1719e50c..0cff347f 100644 --- a/src/pods/canvas/canvas.model.ts +++ b/src/pods/canvas/canvas.model.ts @@ -513,6 +513,7 @@ export const generateDefaultOtherProps = ( case 'progressbar': return { progress: '50', + borderRadius: `${INPUT_SHAPE.DEFAULT_CORNER_RADIUS}`, }; case 'slider': return { From 01b169280a3da6ddee90ac83ae35414bf1068349 Mon Sep 17 00:00:00 2001 From: Jorge Miranda Date: Mon, 14 Oct 2024 13:26:54 +0200 Subject: [PATCH 2/2] Progressbar borerradius --- src/pods/canvas/model/shape-other-props.utils.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pods/canvas/model/shape-other-props.utils.ts b/src/pods/canvas/model/shape-other-props.utils.ts index 3b0b21ee..8c79411b 100644 --- a/src/pods/canvas/model/shape-other-props.utils.ts +++ b/src/pods/canvas/model/shape-other-props.utils.ts @@ -151,6 +151,7 @@ export const generateDefaultOtherProps = ( case 'progressbar': return { progress: '50', + borderRadius: `${INPUT_SHAPE.DEFAULT_CORNER_RADIUS}`, }; case 'slider': return {