File tree Expand file tree Collapse file tree 3 files changed +36
-2
lines changed
routes/list/standard-table Expand file tree Collapse file tree 3 files changed +36
-2
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import { getClassName } from '@react-devui/utils';
3
3
export interface AppStatusDotProps extends React . HTMLAttributes < HTMLDivElement > {
4
4
aTheme ?: 'primary' | 'success' | 'warning' | 'danger' ;
5
5
aColor ?: string ;
6
+ aWave ?: boolean ;
6
7
aSize ?: string | number ;
7
8
}
8
9
@@ -11,6 +12,7 @@ export function AppStatusDot(props: AppStatusDotProps): JSX.Element | null {
11
12
children,
12
13
aTheme,
13
14
aColor,
15
+ aWave = false ,
14
16
aSize,
15
17
16
18
...restProps
@@ -21,6 +23,7 @@ export function AppStatusDot(props: AppStatusDotProps): JSX.Element | null {
21
23
{ ...restProps }
22
24
className = { getClassName ( restProps . className , 'app-status-dot' , {
23
25
[ `t-${ aTheme } ` ] : aTheme ,
26
+ 'app-status-dot--wave' : aWave ,
24
27
} ) }
25
28
style = { {
26
29
...restProps . style ,
Original file line number Diff line number Diff line change @@ -311,7 +311,10 @@ export default function StandardTable(): JSX.Element | null {
311
311
< DTable . Td > { data . model } </ DTable . Td >
312
312
< DTable . Td > { data . price } </ DTable . Td >
313
313
< DTable . Td dNowrap >
314
- < AppStatusDot aTheme = { data . status === 0 ? 'success' : data . status === 1 ? 'warning' : 'danger' } >
314
+ < AppStatusDot
315
+ aTheme = { data . status === 0 ? 'success' : data . status === 1 ? 'warning' : 'danger' }
316
+ aWave = { data . status === 2 }
317
+ >
315
318
{ data . status === 0 ? 'Normal' : data . status === 1 ? 'Failure' : 'Alarm' }
316
319
</ AppStatusDot >
317
320
</ DTable . Td >
Original file line number Diff line number Diff line change
1
+ @keyframes status-dot-wave {
2
+ 0% {
3
+ opacity : 0.5 ;
4
+ transform : scale (0.8 );
5
+ }
6
+
7
+ 100% {
8
+ opacity : 0 ;
9
+ transform : scale (2.4 );
10
+ }
11
+ }
12
+
1
13
@include b (status- dot) {
14
+ --app-status-dot-color : var (--#{$rd-prefix}tag-background-color-fill );
15
+
2
16
display : inline-flex ;
3
17
gap : 0 8px ;
4
18
align-items : center ;
10
24
}
11
25
}
12
26
27
+ @include m (wave) {
28
+ @include e (dot ) {
29
+ & ::after {
30
+ position : absolute ;
31
+ inset : 0 ;
32
+ content : ' ' ;
33
+ border : 1px solid var (--app-status-dot-color );
34
+ border-radius : 50% ;
35
+ animation : status- dot- wave 1.2s ease-in-out infinite ;
36
+ }
37
+ }
38
+ }
39
+
13
40
@include e (dot ) {
41
+ position : relative ;
14
42
width : 6px ;
15
43
height : 6px ;
16
- background-color : var (--app-status-dot-color , var ( --#{$rd-prefix}tag-background-color-fill ) );
44
+ background-color : var (--app-status-dot-color );
17
45
border-radius : 50% ;
18
46
}
19
47
}
You can’t perform that action at this time.
0 commit comments