1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
| import * as React from 'react';
| import { Paper, Typography, Box, Chip, Avatar } from '@mui/material';
| import { teal } from '@mui/material/colors';
|
| const PulseSignal = (props) => {
| const { flag = true, width = 8, ...rest } = props;
|
| return (
| <>
| <Box
| {...rest}
| sx={{
| width: width,
| height: width,
| borderRadius: '50%',
| backgroundColor: flag ? `${teal[400]}` : '#f44336',
| display: 'inline-block',
| animation: 'pulse 1.2s infinite',
| '@keyframes pulse': {
| '0%': {
| transform: 'scale(1)',
| opacity: 1,
| },
| '50%': {
| transform: 'scale(1.2)',
| opacity: 0.7,
| },
| '100%': {
| transform: 'scale(1)',
| opacity: 1,
| },
| },
| }}
| />
| </>
| )
|
| }
|
| export default PulseSignal;
|
|