import React from "react"; import { getDefaultRegistry } from "@rjsf/core"; import { FormContextType, getTemplate, RJSFSchema, WidgetProps } from "@rjsf/utils"; import Typography from "@mui/material/Typography"; import ForeignKeyWidget from "./foreign-key"; import RichtextWidget from "./richtext"; export type CrudTextRJSFSchema = RJSFSchema & { props? : any }; export default function CrudTextWidget( props: WidgetProps ) { const { schema } = props; if (schema.hasOwnProperty("foreignKey")) { return ; } else if (schema.hasOwnProperty("const")) { return {schema.const as string}; } else if (schema.props?.hasOwnProperty("richtext")) { return ; } else { const { widgets: { TextWidget } } = getDefaultRegistry(); return ; } }