fix(striker-ui): patch colouring in stack bar

main
Tsu-ba-me 1 year ago
parent 5804164de5
commit 8360e04c2f
  1. 6
      striker-ui/components/Bars/StackBar.tsx

@ -46,9 +46,9 @@ const StackBar: FC<StackBarProps> = (props) => {
const backgroundColor =
typeof colour === 'string'
? colour
: Object.entries(colour).findLast(
([mark]) => val >= Number(mark),
)?.[1] ?? GREY;
: Object.entries(colour)
.reverse()
.find(([mark]) => val >= Number(mark))?.[1] ?? GREY;
let position: 'absolute' | 'relative' = 'relative';
let top: 0 | undefined;

Loading…
Cancel
Save