Add createProgressNode type (#2109)

This commit is contained in:
Taehyun Hwang
2022-10-04 14:00:11 +02:00
committed by GitHub
parent af041ba9b8
commit bcda6ce01e
+10 -1
View File
@@ -1,5 +1,14 @@
import { clampValue } from "./utils";
interface IcreateProgressNode {
x: number;
y: number;
width: number;
color: string;
progress: number;
progressBarBackgroundColor: string;
}
const createProgressNode = ({
x,
y,
@@ -7,7 +16,7 @@ const createProgressNode = ({
color,
progress,
progressBarBackgroundColor,
}) => {
}: IcreateProgressNode) => {
const progressPercentage = clampValue(progress, 2, 100);
return `