This commit is contained in:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user