From 0db2a24f92b772c442c7e0285b7d4a02e01783b2 Mon Sep 17 00:00:00 2001 From: Juan Di Toro Date: Tue, 10 Oct 2023 17:16:58 +0200 Subject: [PATCH 1/2] fix: better components --- .../lume/LumeIdentity/LumeIdentity.tsx | 16 ++++++++++------ .../lume/LumeIdentity/LumeIdentityContext.ts | 12 ++++++++++++ stories/LumeDashboard.stories.tsx | 1 + stories/LumeIdentity.stories.tsx | 6 +++++- 4 files changed, 28 insertions(+), 7 deletions(-) diff --git a/src/components/lume/LumeIdentity/LumeIdentity.tsx b/src/components/lume/LumeIdentity/LumeIdentity.tsx index be1de47..c908d9d 100644 --- a/src/components/lume/LumeIdentity/LumeIdentity.tsx +++ b/src/components/lume/LumeIdentity/LumeIdentity.tsx @@ -1,4 +1,4 @@ -import React, { type FC } from "react"; +import React, { useState, type FC } from "react"; import { Button } from "../../ui/button"; import { SwitchableComponent, @@ -9,6 +9,7 @@ import * as ComponentList from "./components"; import { LazyMotion, domAnimation } from "framer-motion"; import * as Dialog from "@radix-ui/react-dialog"; import LumeLogoBg from "./LumeLogoBg"; +import { LumeIdentityContext } from "./LumeIdentityContext"; const LumeIdentity: FC = () => { const { visibleComponent, setVisibleComponent } = useSwitchableComponent( @@ -109,6 +110,7 @@ const LumeIdentity: FC = () => { export const LumeIdentityTrigger = Dialog.Trigger; LumeIdentityTrigger.displayName = "LumeIdentityTrigger"; export default function Wrapped({ children }: React.PropsWithChildren) { + const [open, setOpen] = useState(false); const DefaultTrigger = () => (