Skip to content

Commit 5353da2

Browse files
committed
Avoid animation on Chromatic
1 parent 2fc5748 commit 5353da2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

site/src/components/Spinner/Spinner.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* https://v0.dev/ help.
55
*/
66

7+
import isChromatic from "chromatic/*";
78
import { cva, type VariantProps } from "class-variance-authority";
89
import type { ReactNode } from "react";
910
import { cn } from "utils/cn";
@@ -61,7 +62,9 @@ export function Spinner({
6162
height="4"
6263
rx="0.5"
6364
// 0.8 = leaves * 0.1
64-
className="animate-[loading_0.8s_ease-in-out_infinite]"
65+
className={
66+
isChromatic() ? "" : "animate-[loading_0.8s_ease-in-out_infinite]"
67+
}
6568
style={{
6669
transform: `rotate(${rotation}deg)`,
6770
transformOrigin: "center",

0 commit comments

Comments
 (0)