border radius
This commit is contained in:
@@ -13,6 +13,9 @@ const ShapeSettings = ({ selectedObject, onUpdate }: ShapeSettingsProps) => {
|
||||
const baseFill = selectedObject.fill ?? "#3b82f6";
|
||||
const baseStroke = selectedObject.stroke ?? "#1e40af";
|
||||
const baseStrokeWidth = selectedObject.strokeWidth ?? 0;
|
||||
const baseBorderRadius = selectedObject.borderRadius ?? 0;
|
||||
const isSquareShape =
|
||||
selectedObject.shapeType === "square" || selectedObject.shapeType === undefined;
|
||||
|
||||
return (
|
||||
<div className="space-y-4">
|
||||
@@ -65,6 +68,19 @@ const ShapeSettings = ({ selectedObject, onUpdate }: ShapeSettingsProps) => {
|
||||
}
|
||||
min={0}
|
||||
/>
|
||||
{isSquareShape && (
|
||||
<Input
|
||||
label="گردی گوشه"
|
||||
type="number"
|
||||
value={baseBorderRadius}
|
||||
onChange={(e) =>
|
||||
onUpdate(selectedObject.id, {
|
||||
borderRadius: Math.max(0, parseInt(e.target.value) || 0),
|
||||
})
|
||||
}
|
||||
min={0}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user