--- interface Props { value?: number | string values?: (string | number)[] color?: string colors?: string[] size?: string class?: string width?: string id?: string indeterminate?: boolean striped?: boolean animated?: boolean showValue?: boolean } const { value, values, color, colors: colorsProp, size, class: className, width, id, indeterminate, striped, animated, showValue } = Astro.props const percentage = value !== undefined && value !== null && `${value}` !== '' ? `${value}`.split('%').join('') : '38' const colors = colorsProp ?? (color ? [color] : ['blue', 'red', 'green', 'yellow', 'dark']) const valueList = values const classes = ['progress', size && `progress-${size}`, className] ---
{ indeterminate ? (
) : valueList ? ( valueList.map((v, i) =>
) ) : (
{showValue ? `${percentage}%` : {percentage}% Complete}
) }