From 4a4f4f9c632921a460663fa40cd297f60f952c21 Mon Sep 17 00:00:00 2001 From: Matchu Date: Tue, 1 Sep 2020 02:27:16 -0700 Subject: [PATCH] move NC tag onto the thumbnail oh yeah I'm starting to dig this :3 --- src/app/WardrobePage/Item.js | 53 ++++++++++++++++++++++++++++-------- 1 file changed, 42 insertions(+), 11 deletions(-) diff --git a/src/app/WardrobePage/Item.js b/src/app/WardrobePage/Item.js index 95970da..e815d4f 100644 --- a/src/app/WardrobePage/Item.js +++ b/src/app/WardrobePage/Item.js @@ -9,6 +9,7 @@ import { Skeleton, Tooltip, Wrap, + useColorMode, useColorModeValue, useTheme, } from "@chakra-ui/core"; @@ -73,6 +74,7 @@ function Item({ @@ -107,7 +109,6 @@ function Item({ ))} - {item.isNc && NC} @@ -228,39 +229,35 @@ function ItemContainer({ children, isFocusable = true }) { * ItemThumbnail shows a small preview image for the item, including some * hover/focus and worn/unworn states. */ -function ItemThumbnail({ src, isWorn }) { +function ItemThumbnail({ src, isWorn, isNc }) { const theme = useTheme(); + const colorMode = useColorMode(); const borderColor = useColorModeValue( - theme.colors.green["700"], + isNc ? theme.colors.purple["700"] : theme.colors.green["700"], "transparent" ); const focusBorderColor = useColorModeValue( - theme.colors.green["600"], + isNc ? theme.colors.purple["600"] : theme.colors.green["600"], "transparent" ); return ( - + + + + {isNc && ( + + NC + + )} ); }