Skip to content

Commit

Permalink
Progress bar border radius property
Browse files Browse the repository at this point in the history
  • Loading branch information
El-Mito-de-Giralda committed Oct 8, 2024
1 parent b8f0027 commit 1a8efdd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const ProgressBarShape = forwardRef<any, ShapeProps>((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,
Expand All @@ -53,7 +53,7 @@ export const ProgressBarShape = forwardRef<any, ShapeProps>((props, ref) => {
y={0}
width={restrictedWidth}
height={restrictedHeight}
cornerRadius={10}
cornerRadius={borderRadius}
stroke="black"
strokeWidth={2}
fill="white"
Expand All @@ -65,7 +65,7 @@ export const ProgressBarShape = forwardRef<any, ShapeProps>((props, ref) => {
y={0}
width={progressWidth}
height={restrictedHeight}
cornerRadius={10}
cornerRadius={borderRadius}
stroke="black"
strokeWidth={2}
fill="lightgrey"
Expand Down
1 change: 1 addition & 0 deletions src/pods/canvas/canvas.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,7 @@ export const generateDefaultOtherProps = (
case 'progressbar':
return {
progress: '50',
borderRadius: `${INPUT_SHAPE.DEFAULT_CORNER_RADIUS}`,
};
case 'slider':
return {
Expand Down

0 comments on commit 1a8efdd

Please sign in to comment.