add konva js to project + create some components with ai
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user