@aokiapp/rjsf-mantine-theme
Version:
Mantine theme, fields and widgets for react-jsonschema-form
1 lines • 1.14 kB
Source Map (JSON)
{"version":3,"file":"FieldHelpTemplate.mjs","sources":["../../src/templates/FieldHelpTemplate.tsx"],"sourcesContent":["import { helpId, FieldHelpProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';\nimport { Text } from '@mantine/core';\n\n/** The `FieldHelpTemplate` component renders any help desired for a field\n *\n * @param props - The `FieldHelpProps` to be rendered\n */\nexport default function FieldHelpTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: FieldHelpProps<T, S, F>) {\n const { idSchema, help } = props;\n if (!help) {\n return null;\n }\n const id = helpId<T>(idSchema);\n return (\n <Text size='xs' id={id} c='gray'>\n {help}\n </Text>\n );\n}\n"],"names":[],"mappings":";;;;AAIe,SAAS,iBAAiB,CAAC,KAAK,EAAE;AACjD,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;AACnC,EAAE,IAAI,CAAC,IAAI,EAAE;AACb,IAAI,OAAO,IAAI,CAAC;AAChB,GAAG;AACH,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;AAC9B,EAAE,uBAAuB,GAAG,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;AAClF;;;;"}