Update TokenStatus.js

This commit is contained in:
Mitchell McCaffrey 2021-01-21 13:58:37 +11:00
parent 4f76652eff
commit 82e8eb014e

View File

@ -6,20 +6,19 @@ import colors from "../../helpers/colors";
function TokenStatus({ tokenState, width, height }) { function TokenStatus({ tokenState, width, height }) {
return ( return (
<Group x={width} y={height} offsetX={width / 2} offsetY={height / 2}> <Group x={width} y={height} offsetX={width / 2} offsetY={height / 2}>
{tokenState && {tokenState.statuses.map((status, index) => (
tokenState.statuses.map((status, index) => ( <Circle
<Circle key={status}
key={status} width={width}
width={width} height={height}
height={height} stroke={colors[status]}
stroke={colors[status]} strokeWidth={width / 20 / tokenState.size}
strokeWidth={width / 20 / tokenState.size} scaleX={1 - index / 10 / tokenState.size}
scaleX={1 - index / 10 / tokenState.size} scaleY={1 - index / 10 / tokenState.size}
scaleY={1 - index / 10 / tokenState.size} opacity={0.8}
opacity={0.8} fillEnabled={false}
fillEnabled={false} />
/> ))}
))}
</Group> </Group>
); );
} }