From 13ea8b334572c2423abb8d156fd8428f8d074172 Mon Sep 17 00:00:00 2001 From: zhang <zc857179121@qq.com> Date: 星期四, 03 七月 2025 08:24:58 +0800 Subject: [PATCH] 1 --- zy-acs-flow/src/page/components/PulseSignal.jsx | 15 +++++++++++---- 1 files changed, 11 insertions(+), 4 deletions(-) diff --git a/zy-acs-flow/src/page/components/PulseSignal.jsx b/zy-acs-flow/src/page/components/PulseSignal.jsx index e79c7c2..c1d33c5 100644 --- a/zy-acs-flow/src/page/components/PulseSignal.jsx +++ b/zy-acs-flow/src/page/components/PulseSignal.jsx @@ -1,9 +1,16 @@ import * as React from 'react'; import { Paper, Typography, Box, Chip, Avatar } from '@mui/material'; -import { teal } from '@mui/material/colors'; +import { teal, red } from '@mui/material/colors'; const PulseSignal = (props) => { - const { flag = true, width = 8, negative = false, ...rest } = props; + const { + flag = true, + width = 8, + negative = false, + positiveColor = teal[400], + negativeColor = red[400], + ...rest + } = props; return ( <> @@ -14,7 +21,7 @@ width: width, height: width, borderRadius: '50%', - backgroundColor: `${teal[400]}`, + backgroundColor: positiveColor, display: 'inline-block', animation: `pulse ${negative ? '2' : '1.2'}s infinite`, '@keyframes pulse': { @@ -40,7 +47,7 @@ width: width + width / 10, height: width + width / 10, borderRadius: '50%', - backgroundColor: '#f44336', + backgroundColor: negativeColor, display: 'inline-block', }} /> -- Gitblit v1.9.1