add NC badge to items
This commit is contained in:
parent
6dc53814c2
commit
c3d8ead8f8
2 changed files with 13 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { css, cx } from "emotion";
|
import { css, cx } from "emotion";
|
||||||
import {
|
import {
|
||||||
|
Badge,
|
||||||
Box,
|
Box,
|
||||||
Flex,
|
Flex,
|
||||||
IconButton,
|
IconButton,
|
||||||
|
@ -50,10 +51,20 @@ function Item({ item, itemNameId, isWorn, isInOutfit, dispatchToOutfit }) {
|
||||||
isWorn={isWorn}
|
isWorn={isWorn}
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
<Box flex="1 1 auto">
|
<Box
|
||||||
|
flex="1 1 auto"
|
||||||
|
display="flex"
|
||||||
|
flexDirection="row"
|
||||||
|
alignItems="center"
|
||||||
|
>
|
||||||
<ItemName id={itemNameId} isWorn={isWorn}>
|
<ItemName id={itemNameId} isWorn={isWorn}>
|
||||||
{item.name}
|
{item.name}
|
||||||
</ItemName>
|
</ItemName>
|
||||||
|
{item.isNc && (
|
||||||
|
<Badge colorScheme="cyan" marginLeft="2">
|
||||||
|
NC
|
||||||
|
</Badge>
|
||||||
|
)}
|
||||||
</Box>
|
</Box>
|
||||||
<Box flex="0 0 auto">
|
<Box flex="0 0 auto">
|
||||||
<SupportOnly>
|
<SupportOnly>
|
||||||
|
|
|
@ -37,6 +37,7 @@ function useOutfitState() {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
thumbnailUrl
|
thumbnailUrl
|
||||||
|
isNc
|
||||||
|
|
||||||
appearanceOn(speciesId: $speciesId, colorId: $colorId) {
|
appearanceOn(speciesId: $speciesId, colorId: $colorId) {
|
||||||
# This enables us to quickly show the item when the user clicks it!
|
# This enables us to quickly show the item when the user clicks it!
|
||||||
|
|
Loading…
Reference in a new issue