Files
mobile-darmasaba/components/progressBar.tsx
amel 8806f33a8d upd: projeect
Deskripsi:
- ui list project
- ui grid project
- ui create project

No Issues
2025-03-05 15:35:21 +08:00

28 lines
671 B
TypeScript

import Styles from "@/constants/Styles";
import { useEffect, useState } from "react";
import { Animated, Text, View } from "react-native";
type Props = {
margin?: number
}
export default function ProgressBar({ margin }: Props) {
const [progress, setProgress] = useState(new Animated.Value(0));
useEffect(() => {
Animated.timing(progress, {
// 100% = 255
toValue: 127.5,
duration: 1000,
useNativeDriver: false
}).start();
}, []);
return (
<View style={[Styles.wrapBar, { margin: margin && margin }]}>
<Animated.View style={[Styles.contentBar, { width: progress }]} />
</View>
)
}