import { ArrayFieldItemTemplateType, FormContextType, getTemplate, getUiOptions, RJSFSchema, StrictRJSFSchema, } from '@snups/rjsf-utils'; /** The `ArrayFieldItemTemplate` component is the template used to render an items of an array. * * @param props - The `ArrayFieldItemTemplateType` props for the component */ export default function ArrayFieldItemTemplate< T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any, >(props: ArrayFieldItemTemplateType) { const { children, buttonsProps, hasToolbar, uiSchema, registry } = props; const uiOptions = getUiOptions(uiSchema); const ArrayFieldItemButtonsTemplate = getTemplate<'ArrayFieldItemButtonsTemplate', T, S, F>( 'ArrayFieldItemButtonsTemplate', registry, uiOptions, ); return (
{hasToolbar && (
{hasToolbar && (
)}
)} {children}
); }