/** * @file Node layout section for inspector (width/height) */ import * as React from "react"; import type { Node } from "../../../types/core"; import { InspectorLabel } from "../../inspector/parts/InspectorLabel"; import { PositionInputsGrid } from "../../inspector/parts/PositionInputsGrid"; import { Input } from "../../elements/Input"; import { useI18n } from "../../../i18n/context"; type NodeLayoutSectionProps = { node: Node; onWidthChange: (width: number) => void; onHeightChange: (height: number) => void; }; /** * Section for node layout controls (width and height) */ export function NodeLayoutSection({ node, onWidthChange, onHeightChange, }: NodeLayoutSectionProps): React.ReactElement { const { t } = useI18n(); const handleWidthChange = React.useEffectEvent((e: React.ChangeEvent) => { onWidthChange(Number(e.target.value)); }); const handleHeightChange = React.useEffectEvent((e: React.ChangeEvent) => { onHeightChange(Number(e.target.value)); }); return (
{t("inspectorSize")}
); }