You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.1 KiB

import React, { useState, useEffect } from "react";
import { View, Appearance } from "react-native";
import tw from "tailwind-rn";
3 years ago
import Colors from "../constants/Colors";
3 years ago
//Color
import Color from "../constants/Colors";
3 years ago
function Progress({ percent, alignItems }) {
const colorScheme = Appearance.getColorScheme();
const [delayPercent, setDelayPercent] = useState(60);
// useEffect(() => {
// if (percent) {
// setTimeout(() => {
// setDelayPercent(() => percent);
// }, 1000);
// }
// }, [percent]);
3 years ago
return (
<View
style={[
tw(
`w-full h-1.5 rounded-full overflow-hidden my-3 flex ${alignItems}`
),
{ backgroundColor: Colors.theme1[colorScheme].green79 + "22" },
]}
>
3 years ago
<View
style={[
tw("h-full rounded-full"),
3 years ago
{
backgroundColor: Color.theme1[colorScheme].greenCF,
width: percent + "%",
3 years ago
// backgroundColor: Color.theme1.light.blue4,
},
]}
></View>
3 years ago
</View>
);
}
export default Progress;