()
| 3 | import { useState } from "react"; |
| 4 | |
| 5 | export default function ProgressExample() { |
| 6 | const [progress, setProgress] = useState(0.5); |
| 7 | |
| 8 | return ( |
| 9 | <View style={styles.container}> |
| 10 | <Text style={styles.header}>Progress Indicator Example</Text> |
| 11 | <Button |
| 12 | text="Increment Progress" |
| 13 | onClick={() => { |
| 14 | if (progress > 1) { |
| 15 | setProgress(0); |
| 16 | return; |
| 17 | } |
| 18 | setProgress(progress + 0.1); |
| 19 | }} |
| 20 | /> |
| 21 | <View style={{ gap: 10, marginVertical: 10 }}> |
| 22 | <ProgressIndicator progress={progress} /> |
| 23 | <ProgressIndicator progress={progress} variant="linear" /> |
| 24 | </View> |
| 25 | </View> |
| 26 | ); |
| 27 | } |
| 28 | |
| 29 | const styles = StyleSheet.create({ |
| 30 | container: { |
nothing calls this directly
no outgoing calls
no test coverage detected