tooltip showing
This commit is contained in:
parent
e0ec58bc75
commit
339ed2060e
7 changed files with 22 additions and 18 deletions
|
|
@ -58,7 +58,9 @@ export default function ParameterComponent({
|
|||
data.node.template[name]?.value ?? false
|
||||
);
|
||||
|
||||
useEffect(() => {}, [closePopUp, data.node.template]);
|
||||
useEffect(() => {
|
||||
|
||||
}, [closePopUp, data.node.template]);
|
||||
|
||||
const { reactFlowInstance } = useContext(typesContext);
|
||||
let disabled =
|
||||
|
|
@ -232,7 +234,6 @@ export default function ParameterComponent({
|
|||
value={data.node.template[name].value ?? ""}
|
||||
onChange={(t: string) => {
|
||||
data.node.template[name].value = t;
|
||||
|
||||
}}
|
||||
/>
|
||||
) : left === true && type === "file" ? (
|
||||
|
|
|
|||
|
|
@ -59,7 +59,10 @@ export default function GenericNode({
|
|||
}
|
||||
}, []);
|
||||
|
||||
useEffect(() => {}, [closePopUp]);
|
||||
useEffect(() => {
|
||||
console.log(data.node.template);
|
||||
|
||||
}, [closePopUp, data.node.template]);
|
||||
|
||||
const validateNode = useCallback(
|
||||
debounce(async () => {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ const ShadTooltip = (props) => {
|
|||
<TooltipProvider>
|
||||
<Tooltip delayDuration={props.delayDuration}>
|
||||
<TooltipTrigger asChild>{props.children}</TooltipTrigger>
|
||||
{props.open && (
|
||||
|
||||
<TooltipContent
|
||||
side={props.side}
|
||||
avoidCollisions={false}
|
||||
|
|
@ -18,7 +18,7 @@ const ShadTooltip = (props) => {
|
|||
>
|
||||
{props.content}
|
||||
</TooltipContent>
|
||||
)}
|
||||
|
||||
</Tooltip>
|
||||
</TooltipProvider>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -29,20 +29,21 @@ export default function Dropdown({
|
|||
<>
|
||||
<div className={editNode ? "mt-1" : "relative mt-1"}>
|
||||
<Listbox.Button
|
||||
|
||||
className={
|
||||
editNode
|
||||
? "relative pr-9 arrow-hide placeholder:text-center block w-full pt-0.5 pb-0.5 form-input dark:bg-gray-900 dark:text-gray-300 dark:border-gray-600 rounded-md shadow-sm sm:text-sm border-gray-300 border-1" +
|
||||
? "relative pr-8 placeholder:text-center block w-full pt-0.5 pb-0.5 form-input dark:bg-gray-900 dark:text-gray-300 dark:border-gray-600 rounded-md shadow-sm sm:text-sm border-gray-300 border-1" +
|
||||
INPUT_STYLE
|
||||
: "ring-1 ring-slate-300 dark:ring-slate-600 w-full py-2 pl-3 pr-10 text-left dark:focus:ring-offset-2 dark:focus:ring-offset-gray-900 dark:focus:ring-1 dark:focus:ring-gray-600 dark:focus-visible:ring-gray-900 dark:focus-visible:ring-offset-2 focus-visible:outline-none dark:bg-gray-900 dark:text-gray-300 dark:border-gray-600 rounded-md border-gray-300 shadow-sm sm:text-sm" +
|
||||
INPUT_STYLE
|
||||
}
|
||||
>
|
||||
|
||||
<span className="block truncate w-full">{internalValue}</span>
|
||||
<span
|
||||
className={
|
||||
editNode
|
||||
? "hidden"
|
||||
: "pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2"
|
||||
|
||||
"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2"
|
||||
}
|
||||
>
|
||||
<ChevronUpDownIcon
|
||||
|
|
@ -62,7 +63,7 @@ export default function Dropdown({
|
|||
<Listbox.Options
|
||||
className={
|
||||
editNode
|
||||
? "arrow-hide absolute z-10 mt-1 max-h-60 overflow-auto rounded-md bg-white py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm w-[215px]"
|
||||
? "absolute z-10 mt-1 max-h-60 overflow-auto rounded-md bg-white py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm w-[215px]"
|
||||
: "absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm "
|
||||
}
|
||||
>
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ import {
|
|||
DialogTrigger,
|
||||
} from "../../components/ui/dialog";
|
||||
import { Button } from "../../components/ui/button";
|
||||
import { FlowType } from "src/types/flow";
|
||||
import { FlowType } from "../../types/flow";
|
||||
import { getCurlCode, getPythonApiCode, getPythonCode } from "../../constants";
|
||||
import { EXPORT_CODE_DIALOG } from "../../constants";
|
||||
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ import {
|
|||
} from "../../components/ui/dialog";
|
||||
import { Button } from "../../components/ui/button";
|
||||
import { EDIT_DIALOG_SUBTITLE } from "../../constants";
|
||||
import { Edit } from "lucide-react";
|
||||
|
||||
export default function EditNodeModal({ data }: { data: NodeDataType }) {
|
||||
const [open, setOpen] = useState(true);
|
||||
|
|
@ -95,8 +96,8 @@ export default function EditNodeModal({ data }: { data: NodeDataType }) {
|
|||
<DialogHeader>
|
||||
<DialogTitle className="flex items-center">
|
||||
<span className="pr-2">Edit Node</span>
|
||||
<PencilSquareIcon
|
||||
className="h-6 w-6 text-gray-800 pl-1 dark:text-white"
|
||||
<Edit
|
||||
className="h-5 w-5 text-gray-800 pl-1 dark:text-white"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
</DialogTitle>
|
||||
|
|
@ -289,7 +290,6 @@ export default function EditNodeModal({ data }: { data: NodeDataType }) {
|
|||
value={data.node.template[n].value ?? ""}
|
||||
onChange={(t: string) => {
|
||||
data.node.template[n].value = t;
|
||||
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -79,14 +79,13 @@ export default function ImportModal() {
|
|||
<div className="z-50 absolute top-2 left-0 hidden pt-4 pl-4 sm:block">
|
||||
<button
|
||||
type="button"
|
||||
className="rounded-md text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-1 focus:ring-gray-500 focus:ring-offset-1"
|
||||
className="rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground"
|
||||
onClick={() => {
|
||||
setShowExamples(false);
|
||||
}}
|
||||
>
|
||||
<span className="sr-only">Close</span>
|
||||
<ArrowLeftIcon
|
||||
className="h-6 w-6 text-gray-800 ml-1 dark:text-white"
|
||||
className="h-5 w-5 text-gray-800 ml-1 dark:text-white"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
</button>
|
||||
|
|
@ -98,7 +97,7 @@ export default function ImportModal() {
|
|||
{showExamples ? "Select an example" : "Import"}
|
||||
</span>
|
||||
<ArrowUpTrayIcon
|
||||
className="h-6 w-6 text-gray-800 ml-1 dark:text-white"
|
||||
className="h-5 w-5 text-gray-800 ml-1 dark:text-white"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
</DialogTitle>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue