@aokiapp/rjsf-mantine-theme
Version:
Mantine theme, fields and widgets for react-jsonschema-form
17 lines • 733 B
JavaScript
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Title } from '@mantine/core';
const REQUIRED_FIELD_SYMBOL = '*';
/** 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({ title, required, id, }) {
if (!title) {
return null;
}
return (_jsxs(Title, { order: 5, className: 'armt-template-title', id: id, size: 'sm', fw: 500, role: 'heading', style: {
flexGrow: 0,
flexShrink: 0,
}, children: [title, required && _jsx("span", { className: 'required', children: REQUIRED_FIELD_SYMBOL })] }));
}
//# sourceMappingURL=TitleFieldTemplate.js.map