@aokiapp/rjsf-mantine-theme
Version:
Mantine theme, fields and widgets for react-jsonschema-form
1 lines • 1.7 kB
Source Map (JSON)
{"version":3,"file":"TitleFieldTemplate.cjs","sources":["../../src/templates/TitleFieldTemplate.tsx"],"sourcesContent":["import { FormContextType, TitleFieldProps, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';\nimport { Title } from '@mantine/core';\n\nconst REQUIRED_FIELD_SYMBOL = '*';\n\n/** The `TitleField` is the template to use to render the title of a field\n *\n * @param props - The `TitleFieldProps` for this component\n */\nexport default function TitleField<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({\n title,\n required,\n id,\n}: TitleFieldProps<T, S, F>) {\n if (!title) {\n return null;\n }\n return (\n <Title\n order={5}\n className='armt-template-title'\n id={id}\n size='sm'\n fw={500}\n role='heading'\n style={{\n flexGrow: 0,\n flexShrink: 0,\n }}\n >\n {title}\n {required && <span className='required'>{REQUIRED_FIELD_SYMBOL}</span>}\n </Title>\n );\n}\n"],"names":["jsxs","Title","jsx"],"mappings":";;;;;;;AAGA,MAAM,qBAAqB,GAAG,GAAG,CAAC;AACnB,SAAS,UAAU,CAAC;AACnC,EAAE,KAAK;AACP,EAAE,QAAQ;AACV,EAAE,EAAE;AACJ,CAAC,EAAE;AACH,EAAE,IAAI,CAAC,KAAK,EAAE;AACd,IAAI,OAAO,IAAI,CAAC;AAChB,GAAG;AACH,EAAE,uBAAuBA,eAAI;AAC7B,IAAIC,UAAK;AACT,IAAI;AACJ,MAAM,KAAK,EAAE,CAAC;AACd,MAAM,SAAS,EAAE,qBAAqB;AACtC,MAAM,EAAE;AACR,MAAM,IAAI,EAAE,IAAI;AAChB,MAAM,EAAE,EAAE,GAAG;AACb,MAAM,IAAI,EAAE,SAAS;AACrB,MAAM,KAAK,EAAE;AACb,QAAQ,QAAQ,EAAE,CAAC;AACnB,QAAQ,UAAU,EAAE,CAAC;AACrB,OAAO;AACP,MAAM,QAAQ,EAAE;AAChB,QAAQ,KAAK;AACb,QAAQ,QAAQ,oBAAoBC,cAAG,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,qBAAqB,EAAE,CAAC;AAC3G,OAAO;AACP,KAAK;AACL,GAAG,CAAC;AACJ;;;;"}