Skip to content

Commit 6ada4ed

Browse files
committed
chore: fixed typeErrors in skeleton
1 parent e83411e commit 6ada4ed

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/ui/skeleton/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ type ISkeletonProps = React.ComponentProps<typeof View> &
77
VariantProps<typeof skeletonStyle> & {
88
isLoaded?: boolean;
99
startColor?: string;
10+
speed?: number | string;
1011
};
1112

1213
type ISkeletonTextProps = React.ComponentProps<typeof View> &
@@ -34,7 +35,7 @@ const Skeleton = forwardRef<
3435
const pulseAnim = new Animated.Value(1);
3536
const customTimingFunction = Easing.bezier(0.4, 0, 0.6, 1);
3637
const fadeDuration = 0.6;
37-
const animationDuration = (fadeDuration * 10000) / speed; // Convert seconds to milliseconds
38+
const animationDuration = (fadeDuration * 10000) / Number(speed); // Convert seconds to milliseconds
3839

3940
const pulse = Animated.sequence([
4041
Animated.timing(pulseAnim, {

0 commit comments

Comments
 (0)