import * as React from "react"; import { Text, StyleProp, ViewStyle, TextStyle } from "react-native"; import AnimatedCircularProgress from "./AnimatedCircularProgress"; import { withTheme } from "@draftbit/theme"; import type { ReadTheme } from "@draftbit/theme"; type Props = { progress?: number; style?: StyleProp; color?: string; size?: number; showsText?: boolean; unfilledColor?: string; strokeCap?: "butt" | "square" | "round" | undefined; textStyle?: StyleProp; thickness?: number; theme: ReadTheme; }; /** * @deprecated DEPRECATED */ const ProgressCircle: React.FC> = ({ progress = 0.5, style, color = "primary", size = 100, showsText = true, unfilledColor, strokeCap = "butt", textStyle, thickness = 1, theme, }) => { const progressNum = Math.round(progress * 100); const tintColor = color || theme.colors.branding.primary; const backgroundColor = unfilledColor || theme.colors.branding.secondary; return ( {/* @ts-ignore */} {(fill) => showsText ? ( {Math.round(fill)}% ) : null } ); }; export default withTheme(ProgressCircle);