Deskripsi: - update package - ui diskusi home - ui event home - ui bar chart home - ui pie chart home - ui divisi home No Issues
23 lines
584 B
TypeScript
23 lines
584 B
TypeScript
import Styles from "@/constants/Styles";
|
|
import { useEffect, useState } from "react";
|
|
import { Animated, Text, View } from "react-native";
|
|
|
|
export default function ProgressBar() {
|
|
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}>
|
|
<Animated.View style={[Styles.contentBar, { width: progress }]} />
|
|
</View>
|
|
)
|
|
} |