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 }) {
return (
<Group x={width} y={height} offsetX={width / 2} offsetY={height / 2}>
{tokenState &&
tokenState.statuses.map((status, index) => (
<Circle
key={status}
width={width}
height={height}
stroke={colors[status]}
strokeWidth={width / 20 / tokenState.size}
scaleX={1 - index / 10 / tokenState.size}
scaleY={1 - index / 10 / tokenState.size}
opacity={0.8}
fillEnabled={false}
/>
))}
{tokenState.statuses.map((status, index) => (
<Circle
key={status}
width={width}
height={height}
stroke={colors[status]}
strokeWidth={width / 20 / tokenState.size}
scaleX={1 - index / 10 / tokenState.size}
scaleY={1 - index / 10 / tokenState.size}
opacity={0.8}
fillEnabled={false}
/>
))}
</Group>
);
}