From 0eae1679aad9b611edb02b568244d1df7efe405d Mon Sep 17 00:00:00 2001 From: Matt Dunn-Rankin Date: Sat, 25 Apr 2020 23:51:07 -0700 Subject: [PATCH] refactor ItemList.js -> Item.js, cleanups & docs --- src/Item.js | 231 +++++++++++++++++++++++++++++++++++++++++++++ src/ItemList.js | 176 ---------------------------------- src/ItemsPanel.js | 2 +- src/SearchPanel.js | 2 +- 4 files changed, 233 insertions(+), 178 deletions(-) create mode 100644 src/Item.js delete mode 100644 src/ItemList.js diff --git a/src/Item.js b/src/Item.js new file mode 100644 index 0000000..b6199f4 --- /dev/null +++ b/src/Item.js @@ -0,0 +1,231 @@ +import React from "react"; +import { css, cx } from "emotion"; +import { + Box, + Flex, + IconButton, + Image, + Skeleton, + Tooltip, + useTheme, +} from "@chakra-ui/core"; + +/** + * Item show a basic summary of an item, in the context of the current outfit! + * + * It also responds to the focus state of an `input` as its previous sibling. + * This will be an invisible radio/checkbox that controls the actual wear + * state. + * + * In fact, this component can't trigger wear or unwear events! When you click + * it in the app, you're actually clicking a