mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
feat: add text-to-drawing
This commit is contained in:
parent
0958241589
commit
530e92189f
12 changed files with 557 additions and 850 deletions
|
@ -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}
|
||||
>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue