import type { FormContextType, TitleFieldProps, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils'; import { Grid, Header } from 'semantic-ui-react'; import { getSemanticProps } from '../util'; const DEFAULT_OPTIONS = { inverted: false, dividing: true, }; /** 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, optionalDataControl, }: TitleFieldProps) { const semanticProps = getSemanticProps({ uiSchema, defaultSchemaProps: DEFAULT_OPTIONS, }); let heading = title ? (
{title}
) : null; if (optionalDataControl) { heading = ( {heading} {optionalDataControl} ); } return heading; }