Compare commits

..

No commits in common. "546a123874a355c14d2bac875bed44c229e47042" and "5d7a9ecaceabbe6ad515fc0fdd78327b5843d58e" have entirely different histories.

1 changed files with 3 additions and 4 deletions

View File

@ -1,4 +1,4 @@
import React, { useState, type FC, useRef, useEffect } from "react"; import React, { useState, type FC } from "react";
import { Button } from "../../ui/button"; import { Button } from "../../ui/button";
import { import {
SwitchableComponent, SwitchableComponent,
@ -111,7 +111,6 @@ export const LumeIdentityTrigger = Dialog.Trigger;
LumeIdentityTrigger.displayName = "LumeIdentityTrigger"; LumeIdentityTrigger.displayName = "LumeIdentityTrigger";
export default function Wrapped({ children }: React.PropsWithChildren) { export default function Wrapped({ children }: React.PropsWithChildren) {
const [open, setOpen] = useState(false); const [open, setOpen] = useState(false);
const dialogContentEl = useRef<HTMLElement>();
const DefaultTrigger = () => ( const DefaultTrigger = () => (
<LumeIdentityTrigger asChild> <LumeIdentityTrigger asChild>
<button className="bg-primary text-primary-foreground p-2 px-4 text-sm font-semibold font-mono rounded-md"> <button className="bg-primary text-primary-foreground p-2 px-4 text-sm font-semibold font-mono rounded-md">
@ -136,8 +135,8 @@ export default function Wrapped({ children }: React.PropsWithChildren) {
<Trigger /> <Trigger />
<Dialog.Portal> <Dialog.Portal>
<Dialog.Overlay className="fixed z-40 inset-0 bg-black bg-opacity-50 backdrop-blur-sm" /> <Dialog.Overlay className="fixed z-40 inset-0 bg-black bg-opacity-50 backdrop-blur-sm" />
{/* @ditorodev: `left-[calc(50%-192px)]` these two are me being dumb and lazy, would be cool to fix with proper centering */} {/* @ditorodev: `left-[calc(50%-192px)] top-[calc(50vh-174px)]` these two are me being dumb and lazy, would be cool to fix with proper centering */}
<Dialog.Content className="absolute left-[calc(50%-192px)] top-12 mx-auto my-auto w-96 max-w-full h-auto z-40 flex items-center justify-center" > <Dialog.Content className="absolute left-[calc(50%-192px)] mx-auto my-auto w-96 max-w-full h-auto z-40 flex items-center justify-center">
<SwitchableComponentProvider> <SwitchableComponentProvider>
<LumeIdentityContext.Provider value={{open, setOpen}}> <LumeIdentityContext.Provider value={{open, setOpen}}>
<LumeIdentity /> <LumeIdentity />