feat: statusPage - adding pagespeed section
This commit is contained in:
1 parent
8ab049aa6c
commit
6cea199e4f
15 files changed
+231
-11
No files matched your search
@@ -17,6 +17,7 @@ export const Gauge = ({
|
||||
strokeWidth = 15,
|
||||
precision = 1,
|
||||
unit = "%",
|
||||
colorFn,
|
||||
}: {
|
||||
isLoading?: boolean;
|
||||
progress?: number;
|
||||
@@ -24,6 +25,7 @@ export const Gauge = ({
|
||||
strokeWidth?: number;
|
||||
precision?: number;
|
||||
unit?: string;
|
||||
colorFn?: (val: number, theme: any) => string;
|
||||
}) => {
|
||||
const theme = useTheme();
|
||||
const progressWithinRange = Math.max(MINIMUM_VALUE, Math.min(progress, MAXIMUM_VALUE));
|
||||
@@ -48,7 +50,8 @@ export const Gauge = ({
|
||||
return () => clearTimeout(timer);
|
||||
}, [progress, circumference, strokeLength]);
|
||||
|
||||
const fillColor = getInfraGaugeColor(progressWithinRange, theme);
|
||||
const resolvedColorFn = colorFn ?? getInfraGaugeColor;
|
||||
const fillColor = resolvedColorFn(progressWithinRange, theme);
|
||||
|
||||
if (isLoading) {
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user