'use client'; import {composeRenderProps} from 'react-aria-components/composeRenderProps'; import {ProgressBar} from 'react-aria-components/ProgressBar'; import type {ProgressBarProps} from 'react-aria-components/ProgressBar'; export interface ProgressCircleProps extends ProgressBarProps { size?: number; } export function ProgressCircle(props: ProgressCircleProps) { // SVG strokes are centered, so subtract half the stroke width from the radius to create an inner stroke. let strokeWidth = 4; let radius = `calc(50% - ${strokeWidth / 2}px)`; return ( ({ ...style, width: props.size || 16, height: props.size || 16 }))}> {({percentage, isIndeterminate}) => ( <> {isIndeterminate && ( )} )} ); }