uppy/examples/react-native-expo/ProgressBar.js
Mikael Finstad d31c90e443
Run biome check on main (#5896)
this time on main
closes #5891

also: fix a11y tabIndex (key event handler)
2025-08-11 10:06:21 +02:00

38 lines
763 B
JavaScript

import { StyleSheet, Text, View } from 'react-native'
const colorGreen = '#0b8600'
const colorBlue = '#006bb7'
export default function ProgressBar({ progress }) {
return (
<View style={styles.root}>
<View style={styles.wrapper}>
<View
style={[
styles.bar,
{
backgroundColor: progress === 100 ? colorGreen : colorBlue,
width: `${progress}%`,
},
]}
/>
</View>
<Text>{progress ? `${progress}%` : null}</Text>
</View>
)
}
const styles = StyleSheet.create({
root: {
marginTop: 15,
marginBottom: 15,
},
wrapper: {
height: 5,
overflow: 'hidden',
backgroundColor: '#dee1e3',
},
bar: {
height: 5,
},
})