add max width in text
deploy to danak / build_and_deploy (push) Has been cancelled

This commit is contained in:
hamid zarghami
2026-07-02 12:23:58 +03:30
parent d94bf77522
commit 1ed198ca69
6 changed files with 123 additions and 10 deletions
@@ -1,6 +1,7 @@
import type { EditorObject } from "../../../store/editorStore";
import Input from "@/components/Input";
import ColorPicker from "@/components/ColorPicker";
import { DEFAULT_TEXT_MAX_WIDTH_PX } from "@/pages/editor/utils/textStyle";
type TextSettingsProps = {
selectedObject: EditorObject;
@@ -60,6 +61,18 @@ const TextSettings = ({ selectedObject, onUpdate }: TextSettingsProps) => {
})
}
/>
<Input
label="حداکثر عرض متن"
type="number"
value={selectedObject.textMaxWidth ?? DEFAULT_TEXT_MAX_WIDTH_PX}
step="1"
min="80"
onChange={(e) =>
onUpdate(selectedObject.id, {
textMaxWidth: Math.max(80, parseNumber(e.target.value) || DEFAULT_TEXT_MAX_WIDTH_PX),
})
}
/>
<div className="space-y-2">
<p className="text-sm">چینش متن</p>
<div className="grid grid-cols-3 gap-2">