UNPKG

ra-core

Version:

Core components of react-admin, a frontend Framework for building admin applications on top of REST services, using ES6, React

31 lines 1.14 kB
var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; import { useCreateController, } from './useCreateController'; /** * Render prop version of the useCreateController hook * * @see useCreateController * @example * * const CreateView = () => <div>...</div> * const MyCreate = props => ( * <CreateController {...props}> * {controllerProps => <CreateView {...controllerProps} {...props} />} * </CreateController> * ); */ export var CreateController = function (_a) { var children = _a.children, props = __rest(_a, ["children"]); var controllerProps = useCreateController(props); return children(controllerProps); }; //# sourceMappingURL=CreateController.js.map