import React, { useState, useEffect } from 'react'; import { View, Text, StyleSheet, ScrollView } from 'react-native'; import { Ux4gAnimatedCircularProgress, Ux4gCircularProgress, useUx4gTheme } from '../index'; export const CircularProgressShowcase: React.FC = () => { const theme = useUx4gTheme(); const [progress, setProgress] = useState(0.0); useEffect(() => { const interval = setInterval(() => { setProgress((prev) => { const next = Math.round((prev + 0.1) * 10) / 10; return next > 1.0 ? 0.0 : next; }); }, 1000); return () => clearInterval(interval); }, []); return ( Circular Progress Indicator Sizes (Butt Cap) Sizes (Round Cap) Animated Progress Stroke Caps Butt Cap Round Cap With Meta Info External Labels {(['xs', 's', 'm', 'l', 'xl', 'xxl', 'xxxl'] as const).map(s => ( ))} Internal Labels {(['xs', 's', 'm', 'l', 'xl', 'xxl', 'xxxl'] as const).map(s => { const isSmall = ['xs', 's', 'm', 'l'].includes(s); const centerWidget = isSmall ? ( 50% ) : undefined; return ( ); })} ); }; const styles = StyleSheet.create({ container: { flex: 1, }, title: { fontSize: 20, fontWeight: 'bold', margin: 16, }, section: { padding: 16, borderBottomWidth: 1, borderBottomColor: 'rgba(150, 150, 150, 0.2)', }, sectionTitle: { fontSize: 16, fontWeight: '600', marginBottom: 16, }, rowWrap: { flexDirection: 'row', flexWrap: 'wrap', alignItems: 'center', gap: 16, }, row: { flexDirection: 'row', justifyContent: 'space-around', alignItems: 'center', }, column: { alignItems: 'center', } });