UNPKG

admin-on-rest-fr05t1k

Version:

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

20 lines (16 loc) 564 B
import React, { PropTypes } from 'react'; import TextField from 'material-ui/TextField'; import get from 'lodash.get'; import FieldTitle from '../../util/FieldTitle'; const DisabledInput = ({ label, record, resource, source }) => <TextField value={get(record, source)} floatingLabelText={<FieldTitle label={label} source={source} resource={resource} />} disabled />; DisabledInput.propTypes = { label: PropTypes.string, record: PropTypes.object, resource: PropTypes.string, source: PropTypes.string, }; export default DisabledInput;