Skip to content

Commit b2cd515

Browse files
authored
loader color fix (#150)
1 parent 562b80f commit b2cd515

File tree

1 file changed

+30
-21
lines changed
  • public/app/features/dashboard/components/DashboardLoading

1 file changed

+30
-21
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import { Box, CircularProgress, CircularProgressProps, Typography, type BoxProps } from '@mui/material';
22
import React, { type ReactNode, type FC, type HTMLAttributes } from 'react';
33

4+
import { useTheme2 } from '@grafana/ui';
5+
46
import logoUrl from './fn-logo.svg';
57

68
export type FnLoaderProps = {
@@ -17,25 +19,32 @@ export const FnLoader: FC<FnLoaderProps> = ({
1719
circularProgressProps,
1820
imageProps,
1921
text,
20-
}) => (
21-
<Box
22-
display="flex"
23-
justifyContent="center"
24-
alignItems="center"
25-
flexDirection="column"
26-
paddingTop="150px"
27-
{...outerContainerProps}
28-
>
29-
<img src={logoUrl} alt={'FluxNinja logo'} style={{ transform: 'scale(4)' }} {...imageProps} />
30-
<Box marginTop="100px" {...innerContainerProps}>
31-
<CircularProgress
32-
role="alert"
33-
aria-busy="true"
34-
aria-label="Loading..."
35-
disableShrink
36-
{...circularProgressProps}
37-
/>
22+
}) => {
23+
const theme = useTheme2();
24+
25+
return (
26+
<Box
27+
display="flex"
28+
justifyContent="center"
29+
alignItems="center"
30+
flexDirection="column"
31+
paddingTop="150px"
32+
{...outerContainerProps}
33+
>
34+
<img src={logoUrl} alt={'FluxNinja logo'} style={{ transform: 'scale(4)' }} {...imageProps} />
35+
<Box marginTop="100px" {...innerContainerProps}>
36+
<CircularProgress
37+
role="alert"
38+
aria-busy="true"
39+
aria-label="Loading..."
40+
disableShrink
41+
sx={{
42+
color: theme.colors.primary.main,
43+
}}
44+
{...circularProgressProps}
45+
/>
46+
</Box>
47+
{typeof text === 'string' ? <Typography>{text}</Typography> : text || null}
3848
</Box>
39-
{typeof text === 'string' ? <Typography>{text}</Typography> : text || null}
40-
</Box>
41-
);
49+
);
50+
};

0 commit comments

Comments
 (0)