1import React from 'react';
2import PropTypes from 'prop-types';
4import { getDomProps } from '../lib/base'
6const ProtoTextarea = props => {
9 // getDomProps gets any prop prepended with 'prop-'. Useful here because
10 // one cannot simply pass props like {...props} because the input elem
11 // cannot accept children nodes, which are included in the props arg. It
12 // is doubly useful because it lets the developer control which props are
13 // added to the real DOM.
14 {...getDomProps(props)}
15 className={props.className}
16 onChange={e => props.onChange(e)}
17 onKeyPress={e => props.onKeyPress(e)}
18 onFocus={e => props.onFocus(e)}
19 onBlur={e => props.onBlur(e)}
20 placeholder={props.placeholder}
24 autoFocus={props.autoFocus}
25 readOnly={props.readOnly}
26 maxLength={props.maxLength}
27 autoComplete={props.autoComplete} />
32ProtoTextarea.propTypes = {
33 disabled: PropTypes.bool,
34 onChange: PropTypes.func,
35 onBlur: PropTypes.func,
36 onFocus: PropTypes.func,
37 onKeyPress: PropTypes.func,
38 className: PropTypes.string,
39 style: PropTypes.object,
40 children: PropTypes.node,
41 autoFocus: PropTypes.bool,
42 readOnly: PropTypes.bool,
43 name: PropTypes.string,
44 value: PropTypes.string,
45 autoComplete: PropTypes.string,
49ProtoTextarea.defaultProps = {
64export default ProtoTextarea;
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list