Skip to content

Commit e2d7f02

Browse files
jpggvilacadwesolow
authored andcommitted
Fix dots size
1 parent 46d6ad5 commit e2d7f02

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

web_ui/src/shared/components/three-dots-flashing/three-dots-flashing.component.tsx

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright (C) 2022-2025 Intel Corporation
22
// LIMITED EDGE SOFTWARE DISTRIBUTION LICENSE
33

4-
import { motion } from 'framer-motion';
4+
import { motion, Variants } from 'framer-motion';
55

66
import { ColorMode } from '../quiet-button/quiet-action-button.component';
77

@@ -19,9 +19,9 @@ const DOT_COLORS: Record<ColorMode, string> = {
1919
[ColorMode.BLUE]: 'var(--spectrum-global-color-gray-800)',
2020
};
2121

22-
const DOT_SIZES: Record<Sizes, number> = {
23-
S: 8,
24-
M: 16,
22+
const DOT_SIZES: Record<Sizes, string> = {
23+
S: 'var(--spectrum-global-dimension-size-25)',
24+
M: 'var(--spectrum-global-dimension-size-50)',
2525
};
2626

2727
export const ThreeDotsFlashing = ({
@@ -32,15 +32,16 @@ export const ThreeDotsFlashing = ({
3232
const dotColor = DOT_COLORS[mode];
3333
const dotSize = DOT_SIZES[size];
3434

35-
const dotVariants = {
36-
pulse: {
37-
scale: [1, 1.5, 1],
35+
const dotVariants: Variants = {
36+
pulse: (i: number) => ({
37+
scale: [1, 1.4, 1],
3838
transition: {
39-
duration: 1.2,
39+
duration: 1.1,
4040
repeat: Infinity,
4141
ease: 'easeInOut',
42+
delay: i * 0.2,
4243
},
43-
},
44+
}),
4445
};
4546

4647
return (
@@ -52,9 +53,9 @@ export const ThreeDotsFlashing = ({
5253
{[0, 1, 2].map((i) => (
5354
<motion.div
5455
key={i}
56+
custom={i}
5557
variants={dotVariants}
5658
animate='pulse'
57-
transition={{ delay: i * 0.2 }}
5859
style={{
5960
width: dotSize,
6061
height: dotSize,

0 commit comments

Comments
 (0)