feat: add size presets for tools

This commit is contained in:
2026-10-04 21:59:18 +05:00
parent 4d9cd2cfcb
commit 91150a14bf
9 changed files with 85 additions and 18 deletions
@@ -30,7 +30,7 @@
spec: FieldSpec;
toolId: string;
fieldId: string;
onchange?: (value: unknown, axis?: "width" | "height") => void;
onchange?: (value: unknown, axis?: "width" | "height" | "both") => void;
}
const FIELDS: Record<FieldSpecKind, Component<FieldControlProps>> = {
@@ -54,7 +54,11 @@
schema: ToolSchema<Record<string, unknown>>;
values: Record<string, unknown>;
toolId: string;
onchange: (id: string, value: unknown, axis?: "width" | "height") => void;
onchange: (
id: string,
value: unknown,
axis?: "width" | "height" | "both",
) => void;
onreset: () => void;
}
let { schema, values, toolId, onchange, onreset }: Props = $props();