Files
web/packages/design-system/lib/components/Progress/index.tsx
Rasmus Langvad d0546926a9 Merged in fix/3697-prettier-configs (pull request #3396)
fix(SW-3691): Setup one prettier config for whole repo

* Setup prettierrc in root and remove other configs


Approved-by: Joakim Jäderberg
Approved-by: Linus Flood
2026-01-07 12:45:50 +00:00

31 lines
720 B
TypeScript

import { ProgressBar } from "react-aria-components"
import { cx } from "class-variance-authority"
import styles from "./progress.module.css"
import { ProgressProps } from "./types"
export function Progress({
value,
minValue = 0,
maxValue = 100,
"aria-label": ariaLabel,
className,
}: ProgressProps) {
return (
<ProgressBar
value={value}
minValue={minValue}
maxValue={maxValue}
aria-label={ariaLabel}
className={cx(styles.progress, className)}
>
{({ percentage }) => (
<>
<div className={styles.track}>
<div className={styles.fill} style={{ width: `${percentage}%` }} />
</div>
</>
)}
</ProgressBar>
)
}