- Introduced `CatalogFieldPickerDialog` and `CatalogFieldPickerList` for selecting catalog fields. - Implemented `appendTemplateFields` helper function for managing template fields. - Added tests for catalog field selection and template field management. - Created reusable components for field picking and reordering in the UI library. - Enhanced drag-and-drop functionality for reordering items in lists.
29 lines
787 B
TypeScript
29 lines
787 B
TypeScript
import type { ReactNode } from "react";
|
|
|
|
import { FormSection } from "./form-section";
|
|
|
|
/** Datos generales de una plantilla, con columnas equilibradas y separación entre grupos. */
|
|
export function TemplateMetadataSection({
|
|
title,
|
|
primaryFields,
|
|
descriptionField,
|
|
children,
|
|
}: {
|
|
title: string;
|
|
primaryFields: ReactNode;
|
|
descriptionField: ReactNode;
|
|
children?: ReactNode;
|
|
}) {
|
|
return (
|
|
<div className="pb-4">
|
|
<FormSection title={title} variant="plain">
|
|
<div className="grid items-stretch gap-4 @min-[560px]:grid-cols-2">
|
|
<div className="flex min-w-0 flex-col gap-4">{primaryFields}</div>
|
|
<div className="flex min-w-0 flex-col gap-2">{descriptionField}</div>
|
|
</div>
|
|
{children}
|
|
</FormSection>
|
|
</div>
|
|
);
|
|
}
|