Only return string from color getter type

Signed-off-by: James Turley <jamesturley@gocardless.com>
This commit is contained in:
James Turley
2021-11-10 14:49:15 +00:00
parent 60f5d96953
commit 2e641b622b
2 changed files with 3 additions and 5 deletions
@@ -62,9 +62,7 @@ type GetColorArgs = {
max?: number;
};
export type GetColor = (
args: GetColorArgs,
) => string | BackstageTheme['palette']['error'];
export type GetColor = (args: GetColorArgs) => string;
const defaultGaugeProps = {
fractional: true,
@@ -111,8 +111,8 @@ export const StaticColor = () => (
</Grid>
<Grid item>
<GaugeCard
getColor={({ palette }) => palette.error}
title="palette.error"
getColor={({ palette }) => palette.status.error}
title="palette.status.error"
progress={0.5}
/>
</Grid>