This commit is contained in:
rosetta
2026-01-30 05:01:05 +02:00
commit 83f38dc63f
327 changed files with 18725 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
@keyframes spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
.animatedRoundedProgress {
animation: spin 2s linear infinite;
}

View File

@@ -0,0 +1,23 @@
import { RingProgress } from "@mantine/core";
import classes from './AnimatedRoundedProgress.module.css'
interface AnimatedRoundedProgressProps {
value: number;
size?: number;
color?: string;
}
export function AnimatedRoundedProgress(props : AnimatedRoundedProgressProps) {
const value = Math.min(100, Math.max(0, props.value));
const color = props.color || 'white';
return (
<RingProgress
size={props.size || 20}
sections={[{ value, color: color }, { value: 100 - value, color: 'transparent' }]}
transitionDuration={250}
thickness={2}
roundCaps
className={classes.animatedRoundedProgress}
/>
);
}