|
1 | 1 | immutable = require 'immutable' |
2 | 2 | React = require 'react' |
| 3 | +ReactDOM = require 'react-dom-factories' |
| 4 | +PropTypes = require 'prop-types'; |
| 5 | +createClass = require 'create-react-class' |
3 | 6 |
|
4 | | -{ div } = React.DOM |
| 7 | +{ div } = ReactDOM |
5 | 8 | ListItem = React.createFactory require './list-item' |
6 | 9 |
|
7 | 10 |
|
8 | 11 | module.exports = |
9 | | -React.createClass |
| 12 | +createClass |
10 | 13 | displayName: 'ListView' |
11 | 14 |
|
12 | 15 | propTypes: |
13 | | - items: React.PropTypes.object.isRequired |
14 | | - selectedItemId: React.PropTypes.oneOfType([ |
15 | | - React.PropTypes.number |
16 | | - React.PropTypes.string |
| 16 | + items: PropTypes.object.isRequired |
| 17 | + selectedItemId: PropTypes.oneOfType([ |
| 18 | + PropTypes.number |
| 19 | + PropTypes.string |
17 | 20 | ]) |
18 | | - collapsedItemIds: React.PropTypes.object.isRequired |
19 | | - itemClassName: React.PropTypes.string |
20 | | - selectedItemClassName: React.PropTypes.string |
21 | | - ignoreCollapseClicks: React.PropTypes.bool |
22 | | - handler: React.PropTypes.func |
23 | | - renderItem: React.PropTypes.func |
24 | | - onCollapseItem: React.PropTypes.func.isRequired |
25 | | - onExpandItem: React.PropTypes.func.isRequired |
26 | | - onSelectItem: React.PropTypes.func.isRequired |
| 21 | + collapsedItemIds: PropTypes.object.isRequired |
| 22 | + itemClassName: PropTypes.string |
| 23 | + selectedItemClassName: PropTypes.string |
| 24 | + ignoreCollapseClicks: PropTypes.bool |
| 25 | + handler: PropTypes.func |
| 26 | + renderItem: PropTypes.func |
| 27 | + onCollapseItem: PropTypes.func.isRequired |
| 28 | + onExpandItem: PropTypes.func.isRequired |
| 29 | + onSelectItem: PropTypes.func.isRequired |
27 | 30 |
|
28 | 31 | getDefaultProps: -> |
29 | 32 | itemClassName: '' |
|
0 commit comments