import React from 'react' import { RIETextArea } from 'riek' const Title = (props) => { if (props.authorizedToEdit) { return ( { const ENTER = 13 if (e.which === ENTER) { e.preventDefault() props.onChange({ name: e.target.value }) } } }} /> ) } else { return ( {props.name} ) } } /* * Title.propTypes = { * name: PropTypes.string, * onChange: PropTypes.func, * authorizedToEdit: PropTypes.bool * } */ export default Title