mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-03-10 10:33:11 +03:00
26 lines
832 B
TypeScript
26 lines
832 B
TypeScript
import type { ComponentType } from "react";
|
|
import SemanticSearchReindex from "./SemanticSearchReindex.tsx";
|
|
|
|
export type RendererComponent = ComponentType<
|
|
Record<string, unknown> | undefined
|
|
>;
|
|
|
|
export type SectionRenderers = Record<
|
|
string,
|
|
Record<string, RendererComponent>
|
|
>;
|
|
|
|
// Section renderers registry
|
|
// Used to register custom renderer components for specific config sections.
|
|
// Maps a section key (e.g., `semantic_search`) to a mapping of renderer
|
|
// names to React components. These names are referenced from `uiSchema`
|
|
// descriptors (e.g., `{ "ui:after": { render: "SemanticSearchReindex" } }`) and
|
|
// are resolved by `FieldTemplate` through `formContext.renderers`.
|
|
export const sectionRenderers: SectionRenderers = {
|
|
semantic_search: {
|
|
SemanticSearchReindex,
|
|
},
|
|
};
|
|
|
|
export default sectionRenderers;
|