From 49fc125d923d688ff3f3caa8cdc175b172665199 Mon Sep 17 00:00:00 2001 From: Mark Date: Sat, 11 May 2024 18:41:10 +0200 Subject: [PATCH] fix row buttons close --- src/components/Group/ButtonRow.jsx | 76 ++++++++++++++++-------------- 1 file changed, 40 insertions(+), 36 deletions(-) diff --git a/src/components/Group/ButtonRow.jsx b/src/components/Group/ButtonRow.jsx index 82efd18..06f5081 100644 --- a/src/components/Group/ButtonRow.jsx +++ b/src/components/Group/ButtonRow.jsx @@ -2,7 +2,7 @@ import React from "react"; import { FaPalette, FaImages, FaLightbulb } from "react-icons/fa"; import { MdInvertColors } from "react-icons/md"; -import { motion } from "framer-motion"; +import { motion, AnimatePresence } from "framer-motion"; const ButtonRow = ({ showContainer, @@ -20,55 +20,59 @@ const ButtonRow = ({ }; return ( - <> - {showContainer !== "closed" && ( - - {lightsCapabilities.includes("xy") && ( + + {showContainer !== "closed" && ( + + {lightsCapabilities.includes("xy") && ( + + setShowContainer("colorPicker")} /> + + )} + + {lightsCapabilities.includes("ct") && ( + + setShowContainer("colorTempPicker")} + /> + + )} + - setShowContainer("colorPicker")} /> + setSceneModal(true)} /> - )} - {lightsCapabilities.includes("ct") && ( - setShowContainer("colorTempPicker")} - /> + setShowContainer("lights")} /> - )} - - - setSceneModal(true)} /> - - - - setShowContainer("lights")} /> - - )} - + )} + ); };