parent
81a35e046e
commit
b18e4a2bd4
|
|
@ -46,9 +46,9 @@ const Wrapper: Component<{
|
|||
)}
|
||||
>
|
||||
{children}
|
||||
<RootPortal>
|
||||
<RootPortal to={entryId ? null : undefined}>
|
||||
<div
|
||||
className="pointer-events-auto fixed bottom-4 right-4 z-[99] flex gap-3 text-white/70 [&_button]:hover:text-white"
|
||||
className="pointer-events-auto absolute bottom-4 right-4 z-[99] flex gap-3 text-white/70 [&_button]:hover:text-white"
|
||||
onClick={stopPropagation}
|
||||
>
|
||||
{showActions && (
|
||||
|
|
|
|||
|
|
@ -5,10 +5,11 @@ import { useRootPortal } from "./provider"
|
|||
|
||||
export const RootPortal: FC<
|
||||
{
|
||||
to?: HTMLElement
|
||||
to?: HTMLElement | null
|
||||
} & PropsWithChildren
|
||||
> = (props) => {
|
||||
const to = useRootPortal()
|
||||
if (props.to === null) return props.children
|
||||
|
||||
return createPortal(props.children, props.to || to || document.body)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue