Skip to content

Instantly share code, notes, and snippets.

@ahmadyogi543
Created August 23, 2022 05:31
Show Gist options
  • Save ahmadyogi543/ca97df77422919bad3a049eabecbdd58 to your computer and use it in GitHub Desktop.
Save ahmadyogi543/ca97df77422919bad3a049eabecbdd58 to your computer and use it in GitHub Desktop.
import React from "react";
import { StyleSheet, Text, View } from "react-native";
function NAProgressBar({ progress = 0 }) {
return (
<View style={styles.progressbar}>
<View
style={[
styles.on,
{
width: `${progress}%`,
},
]}
></View>
</View>
);
}
const styles = StyleSheet.create({
progressbar: {
height: 8,
backgroundColor: "#d9e9e2",
borderRadius: 4,
flex: 1,
marginHorizontal: 16,
},
on: {
backgroundColor: "#43936c",
flex: 1,
borderRadius: 4,
},
});
export default NAProgressBar;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment