add konva js to project + create some components with ai

This commit is contained in:
hamid zarghami
2025-11-16 16:33:54 +03:30
parent c1c6b0ebf7
commit 1a0c869101
38 changed files with 1855 additions and 42 deletions
@@ -0,0 +1,30 @@
import type { ToolType } from "../../store/editorStore";
import { ImageUpload, DocumentUpload, VideoInput, LinkInput, SimpleInstruction } from "./instructions";
type ToolInstructionsProps = {
tool: ToolType;
onImageUpload: (e: React.ChangeEvent<HTMLInputElement>) => void;
};
const ToolInstructions = ({ tool, onImageUpload }: ToolInstructionsProps) => {
if (tool === "image") {
return <ImageUpload onImageUpload={onImageUpload} />;
}
if (tool === "document") {
return <DocumentUpload />;
}
if (tool === "video") {
return <VideoInput />;
}
if (tool === "link") {
return <LinkInput />;
}
return <SimpleInstruction tool={tool} />;
};
export default ToolInstructions;