Skip to content

Commit 728b9cb

Browse files
committed
fix(spinner): wrong prop logic
The `animate` prop of the spinner component was previously named as `disableAnimation`, and probably during rename, its logic wasn't inverted. So this commit adjusts the logic and animate has the correct and expected behavior.
1 parent cc174f3 commit 728b9cb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/components/Spinner/component.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { SpinnerProps } from './types';
99
* @component
1010
* @param {number|string} [size=48] - The width and height of the spinner. Accepts a number (pixels) or a CSS string (e.g., '2rem', '24px').
1111
* @param {number} [strokeWidth=4] - The thickness of the spinner stroke.
12-
* @param {boolean} [animate=false] - If true, disables the animation.
12+
* @param {boolean} [animate=true] - If false, disables the animation.
1313
* @returns {JSX.Element} The rendered spinner component.
1414
*
1515
* @example
@@ -22,17 +22,17 @@ import { SpinnerProps } from './types';
2222
const Spinner: React.FC<SpinnerProps> = ({
2323
size = 48,
2424
strokeWidth = 4,
25-
animate = false,
25+
animate = true,
2626
}) => {
2727
return (
28-
<Styled.Wrapper $size={size} role="progressbar" aria-label="Loading" aria-busy={!animate}>
29-
<Styled.StyledSvg viewBox="0 0 50 50" $animate={!animate} focusable="false" aria-hidden="true">
28+
<Styled.Wrapper $size={size} role="progressbar" aria-label="Loading" aria-busy={animate}>
29+
<Styled.StyledSvg viewBox="0 0 50 50" $animate={animate} focusable="false" aria-hidden="true">
3030
<Styled.Path
3131
className="path"
3232
cx="25"
3333
cy="25"
3434
r="20"
35-
$animate={!animate}
35+
$animate={animate}
3636
$strokeWidth={strokeWidth}
3737
/>
3838
</Styled.StyledSvg>

0 commit comments

Comments
 (0)