@rjsf/semantic-ui
Version:
Semantic UI theme, fields and widgets for react-jsonschema-form
22 lines • 699 B
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import { Header } from 'semantic-ui-react';
import { getSemanticProps } from '../util.js';
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, }) {
const semanticProps = getSemanticProps({
uiSchema,
defaultSchemaProps: DEFAULT_OPTIONS,
});
if (!title) {
return null;
}
return (_jsx(Header, { id: id, ...semanticProps, as: 'h5', children: title }));
}
//# sourceMappingURL=TitleField.js.map