import type { FormContextType, RJSFSchema, StrictRJSFSchema, TitleFieldProps } from '@rjsf/utils'; import { getUiOptions, titleId } from '@rjsf/utils'; import { Divider } from 'primereact/divider'; /** The `TitleField` is the template to use to render the title of a field * * @param props - The `TitleFieldProps` for this component */ export default function TitleField({ id, title, uiSchema, required, optionalDataControl, }: TitleFieldProps) { const uiOptions = getUiOptions(uiSchema); let heading = (
{uiOptions.title || title} {required ? '*' : ''}
); if (optionalDataControl) { heading = (
{heading}
{optionalDataControl}
); } return (
{heading}
); }