Create all components

This commit is contained in:
hamid zarghami
2025-11-18 14:38:08 +03:30
parent 1a0c869101
commit 8070a3f837
16 changed files with 181 additions and 64 deletions
@@ -0,0 +1,9 @@
const ArrowInstruction = () => (
<div className="text-sm text-gray-600">
<p>برای رسم پیکان، روی کانوس کلیک کرده و بکشید</p>
</div>
);
export default ArrowInstruction;
@@ -0,0 +1,9 @@
const CircleInstruction = () => (
<div className="text-sm text-gray-600">
<p>برای رسم دایره، روی کانوس کلیک کرده و بکشید</p>
</div>
);
export default CircleInstruction;
@@ -0,0 +1,9 @@
const GridInstruction = () => (
<div className="text-sm text-gray-600">
<p>برای افزودن گرید، روی کانوس کلیک کنید</p>
</div>
);
export default GridInstruction;
@@ -0,0 +1,9 @@
const LineInstruction = () => (
<div className="text-sm text-gray-600">
<p>برای رسم خط، روی کانوس کلیک کرده و بکشید</p>
</div>
);
export default LineInstruction;
@@ -0,0 +1,9 @@
const RectangleInstruction = () => (
<div className="text-sm text-gray-600">
<p>برای رسم مستطیل، روی کانوس کلیک کرده و بکشید</p>
</div>
);
export default RectangleInstruction;
@@ -0,0 +1,9 @@
const SelectInstruction = () => (
<div className="text-sm text-gray-600">
<p>برای انتخاب و جابجایی اشیاء، روی آنها کلیک کنید</p>
</div>
);
export default SelectInstruction;
@@ -1,31 +0,0 @@
import type { ToolType } from "../../../store/editorStore";
type SimpleInstructionProps = {
tool: ToolType;
};
const SimpleInstruction = ({ tool }: SimpleInstructionProps) => {
const instructions: Record<ToolType, string> = {
select: "برای انتخاب و جابجایی اشیاء، روی آن‌ها کلیک کنید",
rectangle: "برای رسم مستطیل، روی کانوس کلیک کرده و بکشید",
circle: "برای رسم دایره، روی کانوس کلیک کرده و بکشید",
text: "برای افزودن متن، روی کانوس کلیک کنید",
line: "برای رسم خط، روی کانوس کلیک کرده و بکشید",
arrow: "برای رسم پیکان، روی کانوس کلیک کرده و بکشید",
sticker: "برای افزودن استیکر، روی کانوس کلیک کنید",
grid: "برای افزودن گرید، روی کانوس کلیک کنید",
image: "",
document: "",
video: "",
link: "",
};
return (
<div className="text-sm text-gray-600">
<p>{instructions[tool]}</p>
</div>
);
};
export default SimpleInstruction;
@@ -0,0 +1,9 @@
const StickerInstruction = () => (
<div className="text-sm text-gray-600">
<p>برای افزودن استیکر، روی کانوس کلیک کنید</p>
</div>
);
export default StickerInstruction;
@@ -0,0 +1,9 @@
const TextInstruction = () => (
<div className="text-sm text-gray-600">
<p>برای افزودن متن، روی کانوس کلیک کنید</p>
</div>
);
export default TextInstruction;
@@ -2,5 +2,12 @@ export { default as ImageUpload } from "./ImageUpload";
export { default as DocumentUpload } from "./DocumentUpload";
export { default as VideoInput } from "./VideoInput";
export { default as LinkInput } from "./LinkInput";
export { default as SimpleInstruction } from "./SimpleInstruction";
export { default as SelectInstruction } from "./SelectInstruction";
export { default as RectangleInstruction } from "./RectangleInstruction";
export { default as CircleInstruction } from "./CircleInstruction";
export { default as TextInstruction } from "./TextInstruction";
export { default as LineInstruction } from "./LineInstruction";
export { default as ArrowInstruction } from "./ArrowInstruction";
export { default as StickerInstruction } from "./StickerInstruction";
export { default as GridInstruction } from "./GridInstruction";