UNPKG

admin-on-rest-fr05t1k

Version:

A frontend Framework for building admin applications on top of REST services, using ES6, React and Material UI

26 lines (20 loc) 721 B
import React, { PropTypes } from 'react'; import ViewListIcon from 'material-ui/svg-icons/action/view-list'; const componentPropType = PropTypes.oneOfType([PropTypes.func, PropTypes.string]); const Resource = () => <span>&lt;Resource&gt; elements are for configuration only and should not be rendered</span>; Resource.propTypes = { name: PropTypes.string.isRequired, list: componentPropType, create: componentPropType, edit: componentPropType, show: componentPropType, remove: componentPropType, icon: componentPropType, options: PropTypes.object, checkCredentials: PropTypes.func, }; Resource.defaultProps = { icon: ViewListIcon, options: {}, }; export default Resource;