rearrange item buttons for consistency

On the search panel, not all items have the remove button, and it's confusing to have the other buttons be in inconsistent positions!

Move the Remove button to the left side of the list, so that everything else is positioned the same regardless
This commit is contained in:
Emi Matchu 2020-09-01 20:45:30 -07:00
parent 99feddb859
commit 46b8245b9a

View file

@ -109,6 +109,16 @@ function Item({
</Wrap>
</Box>
<Box flex="0 0 auto">
{isInOutfit && (
<ItemActionButton
icon={<DeleteIcon />}
label="Remove"
onClick={(e) => {
dispatchToOutfit({ type: "removeItem", itemId: item.id });
e.preventDefault();
}}
/>
)}
<SupportOnly>
<ItemActionButton
icon={<EditIcon />}
@ -127,16 +137,6 @@ function Item({
}-${item.name.replace(/ /g, "-")}`}
onClick={(e) => e.stopPropagation()}
/>
{isInOutfit && (
<ItemActionButton
icon={<DeleteIcon />}
label="Remove"
onClick={(e) => {
dispatchToOutfit({ type: "removeItem", itemId: item.id });
e.preventDefault();
}}
/>
)}
</Box>
</ItemContainer>
<SupportOnly>