From 32b31c659630f4e0cdc7d58632981be667103694 Mon Sep 17 00:00:00 2001 From: Matt Dunn-Rankin Date: Wed, 22 Apr 2020 01:10:24 -0700 Subject: [PATCH] editable outfit name --- app/src/WardrobePage.js | 59 ++++++++++++++++++++++++++++++++--------- 1 file changed, 47 insertions(+), 12 deletions(-) diff --git a/app/src/WardrobePage.js b/app/src/WardrobePage.js index 93705f4..6bb6acd 100644 --- a/app/src/WardrobePage.js +++ b/app/src/WardrobePage.js @@ -4,9 +4,13 @@ import { Flex, Grid, Heading, + IconButton, Image, Stack, PseudoBox, + Editable, + EditablePreview, + EditableInput, } from "@chakra-ui/core"; import useOutfitState from "./useOutfitState.js"; @@ -58,18 +62,49 @@ function ItemsPanel() { const [zonesAndItems, wearItem] = useOutfitState(); return ( - - {zonesAndItems.map(({ zoneName, items, wornItemId }) => ( - - - - ))} - + <> + + + + {({ isEditing, onRequestEdit }) => ( + <> + + + {!isEditing && ( + + + + )} + + )} + + + + + {zonesAndItems.map(({ zoneName, items, wornItemId }) => ( + + + + ))} + + ); }