upd: ui home
Deskripsi: - update package - ui diskusi home - ui event home - ui bar chart home - ui pie chart home - ui divisi home No Issues
This commit is contained in:
23
components/progressBar.tsx
Normal file
23
components/progressBar.tsx
Normal file
@@ -0,0 +1,23 @@
|
||||
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>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user