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,37 @@
import type { EditorObject } from "../../../store/editorStore";
import Input from "@/components/Input";
type GridSettingsProps = {
selectedObject: EditorObject;
onUpdate: (id: string, updates: Partial<EditorObject>) => void;
};
const GridSettings = ({ selectedObject, onUpdate }: GridSettingsProps) => {
return (
<>
<Input
label="عرض"
type="number"
value={selectedObject.width || 200}
onChange={(e) =>
onUpdate(selectedObject.id, {
width: parseInt(e.target.value) || 200,
})
}
/>
<Input
label="ارتفاع"
type="number"
value={selectedObject.height || 200}
onChange={(e) =>
onUpdate(selectedObject.id, {
height: parseInt(e.target.value) || 200,
})
}
/>
</>
);
};
export default GridSettings;
@@ -5,4 +5,5 @@ export { default as SizeSettings } from "./SizeSettings";
export { default as LinkSettings } from "./LinkSettings";
export { default as VideoSettings } from "./VideoSettings";
export { default as TransformSettings } from "./TransformSettings";
export { default as GridSettings } from "./GridSettings";