From 58735a7d00a00b1b346f565816b418ea013b5938 Mon Sep 17 00:00:00 2001 From: Dev Aggarwal Date: Sun, 8 Dec 2024 13:56:06 +0530 Subject: [PATCH] add placement option for popover --- app/components/GooeyPopover.tsx | 4 ++++ app/renderer.tsx | 3 ++- py/gooey_gui/components/common.py | 7 +++++-- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/app/components/GooeyPopover.tsx b/app/components/GooeyPopover.tsx index 0629a19..93e3a45 100644 --- a/app/components/GooeyPopover.tsx +++ b/app/components/GooeyPopover.tsx @@ -2,18 +2,21 @@ import Tippy from "@tippyjs/react"; import { useState } from "react"; import { OnChange } from "~/app"; import { RenderedChildren, TreeNode } from "~/renderer"; +import { TooltipPlacement } from "./GooeyTooltip"; export default function GooeyPopover({ content, children, onChange, state, + placement, ...props }: { content: Array; children: Array; onChange: OnChange; state: Record; + placement?: TooltipPlacement; }) { const [visible, setVisible] = useState(false); @@ -33,6 +36,7 @@ export default function GooeyPopover({ } animation="scale" duration={100} + placement={placement || "auto"} {...props} >