generative_front/components/loading/ChatTypingLoader.js
Hossein Salari 9faecb783a
All checks were successful
Build and Deploy Next.js + Nginx Docker Image / build-and-deploy (push) Successful in 2m51s
Build and Deploy Next.js + Nginx Docker Image / deploy (push) Successful in 7s
refactor: improve some styles, develop ResultBox component & use it at all panels
2026-02-25 14:18:01 +03:30

35 lines
695 B
JavaScript

import { Box } from "@chakra-ui/react";
import { keyframes } from "@emotion/react";
const pulse = keyframes`
0% {
transform: scale(0.7);
opacity: 0.4;
box-shadow: 0 0 0 0 rgba(147, 51, 234, 0.4);
}
50% {
transform: scale(1);
opacity: 1;
box-shadow: 0 0 0 8px rgba(147, 51, 234, 0);
}
100% {
transform: scale(0.7);
opacity: 0.4;
box-shadow: 0 0 0 0 rgba(147, 51, 234, 0);
}
`;
const ChatTypingLoader = ({ size = "10px", color = "purple.400" }) => {
return (
<Box
w={size}
h={size}
borderRadius="full"
bg={color}
animation={`${pulse} 1.1s ease-in-out infinite`}
/>
);
};
export default ChatTypingLoader;