File tree Expand file tree Collapse file tree 1 file changed +12
-16
lines changed Expand file tree Collapse file tree 1 file changed +12
-16
lines changed Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
2
import PropTypes from 'prop-types' ;
3
- import createReactClass from 'create-react-class' ;
4
-
5
- const Divider = createReactClass ( {
6
- displayName : 'Divider' ,
7
-
8
- propTypes : {
9
- className : PropTypes . string ,
10
- rootPrefixCls : PropTypes . string ,
11
- } ,
12
-
13
- getDefaultProps ( ) {
14
- // To fix keyboard UX.
15
- return { disabled : true } ;
16
- } ,
17
3
4
+ class Divider extends React . Component {
18
5
render ( ) {
19
6
const { className = '' , rootPrefixCls } = this . props ;
20
7
return < li className = { `${ className } ${ rootPrefixCls } -item-divider` } /> ;
21
- } ,
22
- } ) ;
8
+ }
9
+ }
10
+
11
+ Divider . propTypes = {
12
+ className : PropTypes . string ,
13
+ rootPrefixCls : PropTypes . string ,
14
+ } ;
15
+
16
+ Divider . defaultProps = {
17
+ disabled : true ,
18
+ } ;
23
19
24
20
export default Divider ;
You can’t perform that action at this time.
0 commit comments