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.1 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 { useShowController, } from './useShowController'; /** * Render prop version of the useShowController hook * * @see useShowController * @example * * const ShowView = () => <div>...</div> * const MyShow = () => ( * <ShowController> * {controllerProps => <ShowView {...controllerProps} {...props} />} * </ShowController> * ); */ export var ShowController = function (_a) { var children = _a.children, props = __rest(_a, ["children"]); var controllerProps = useShowController(props); return children(controllerProps); }; //# sourceMappingURL=ShowController.js.map