feat: add text-to-drawing

This commit is contained in:
are 2023-11-28 18:35:03 +01:00
parent 0958241589
commit 530e92189f
No known key found for this signature in database
GPG key ID: 8367A69658056EE3
12 changed files with 557 additions and 850 deletions

View file

@ -9,9 +9,11 @@ import { trackEvent } from "../../analytics";
export const TTDDialogTrigger = ({
children,
icon,
tab,
}: {
children?: ReactNode;
icon?: JSX.Element;
tab?: string;
}) => {
const { TTDDialogTriggerTunnel } = useTunnels();
const setAppState = useExcalidrawSetAppState();
@ -21,7 +23,9 @@ export const TTDDialogTrigger = ({
<DropdownMenu.Item
onSelect={() => {
trackEvent("ai", "dialog open", "ttd");
setAppState({ openDialog: { name: "ttd", tab: "text-to-diagram" } });
setAppState({
openDialog: { name: "ttd", tab: tab ?? "text-to-diagram" },
});
}}
icon={icon ?? brainIcon}
>