fixed animated processing icon
This commit is contained in:
parent
db715c122b
commit
581879f5f6
2 changed files with 21 additions and 33 deletions
|
|
@ -1,26 +1,16 @@
|
||||||
interface AnimatedProcessingIconProps {
|
import type { SVGProps } from "react";
|
||||||
className?: string;
|
|
||||||
size?: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export const AnimatedProcessingIcon = ({
|
export const AnimatedProcessingIcon = (props: SVGProps<SVGSVGElement>) => {
|
||||||
className = "",
|
return (
|
||||||
size = 10,
|
<svg
|
||||||
}: AnimatedProcessingIconProps) => {
|
viewBox="0 0 8 12"
|
||||||
const width = Math.round((size * 6) / 10);
|
fill="none"
|
||||||
const height = size;
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
{...props}
|
||||||
return (
|
>
|
||||||
<svg
|
<title>Processing</title>
|
||||||
width={width}
|
<style>
|
||||||
height={height}
|
{`
|
||||||
viewBox="0 0 6 10"
|
|
||||||
fill="none"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
className={className}
|
|
||||||
>
|
|
||||||
<style>
|
|
||||||
{`
|
|
||||||
.dot-1 { animation: pulse-wave 1.5s infinite; animation-delay: 0s; }
|
.dot-1 { animation: pulse-wave 1.5s infinite; animation-delay: 0s; }
|
||||||
.dot-2 { animation: pulse-wave 1.5s infinite; animation-delay: 0.1s; }
|
.dot-2 { animation: pulse-wave 1.5s infinite; animation-delay: 0.1s; }
|
||||||
.dot-3 { animation: pulse-wave 1.5s infinite; animation-delay: 0.2s; }
|
.dot-3 { animation: pulse-wave 1.5s infinite; animation-delay: 0.2s; }
|
||||||
|
|
@ -30,20 +20,18 @@ export const AnimatedProcessingIcon = ({
|
||||||
@keyframes pulse-wave {
|
@keyframes pulse-wave {
|
||||||
0%, 60%, 100% {
|
0%, 60%, 100% {
|
||||||
opacity: 0.25;
|
opacity: 0.25;
|
||||||
transform: scale(1);
|
|
||||||
}
|
}
|
||||||
30% {
|
30% {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
transform: scale(1.2);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`}
|
`}
|
||||||
</style>
|
</style>
|
||||||
<circle className="dot-1" cx="1" cy="5" r="1" fill="currentColor" />
|
<circle className="dot-1" cx="2" cy="6" r="1" fill="currentColor" />
|
||||||
<circle className="dot-2" cx="1" cy="9" r="1" fill="currentColor" />
|
<circle className="dot-2" cx="2" cy="10" r="1" fill="currentColor" />
|
||||||
<circle className="dot-3" cx="5" cy="1" r="1" fill="currentColor" />
|
<circle className="dot-3" cx="6" cy="2" r="1" fill="currentColor" />
|
||||||
<circle className="dot-4" cx="5" cy="5" r="1" fill="currentColor" />
|
<circle className="dot-4" cx="6" cy="6" r="1" fill="currentColor" />
|
||||||
<circle className="dot-5" cx="5" cy="9" r="1" fill="currentColor" />
|
<circle className="dot-5" cx="6" cy="10" r="1" fill="currentColor" />
|
||||||
</svg>
|
</svg>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ export const StatusBadge = ({ status, className }: StatusBadgeProps) => {
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
{status === "processing" && (
|
{status === "processing" && (
|
||||||
<AnimatedProcessingIcon className="text-current mr-2" size={10} />
|
<AnimatedProcessingIcon className="text-current h-4 w-4 shrink-0" />
|
||||||
)}
|
)}
|
||||||
{config.label}
|
{config.label}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue