diff --git a/src/Loaders/LoadingSpinner.tsx b/src/Loaders/LoadingSpinner.tsx index 316480e4..763c7556 100644 --- a/src/Loaders/LoadingSpinner.tsx +++ b/src/Loaders/LoadingSpinner.tsx @@ -1,6 +1,7 @@ /** @jsx jsx */ import React from "react"; import * as CSS from "csstype"; +import isChromatic from "storybook-chromatic/isChromatic"; import { jsx, keyframes } from "@emotion/core"; import { colors } from "../colors"; @@ -74,7 +75,7 @@ export const LoadingSpinner: React.FC = ({ const pixelSize = SIZE_MAP[size]; const mountTime = React.useRef(Date.now()); - const mountDelay = -(mountTime.current % 540); + const mountDelay = isChromatic() ? 0 : -(mountTime.current % 540); return ( boolean; + export default isChromatic; +}