UNPKG

@schema-render/form-render-react

Version:

Out-of-the-box form rendering library based on Core and Antd.

11 lines (10 loc) 423 B
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime"; import useFormRenderContext from "../hooks/useFormRenderContext"; import { isEmpty } from "../utils"; const Description = ({ children })=>{ const { readonlyPlaceholder } = useFormRenderContext(); return /*#__PURE__*/ _jsx(_Fragment, { children: isEmpty(children) ? readonlyPlaceholder : children }); }; export default Description;