diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Panel.jsx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Panel.jsx b/src/Panel.jsx index a5464c4..f5cf7bc 100644 --- a/src/Panel.jsx +++ b/src/Panel.jsx | |||
@@ -2,6 +2,7 @@ import React, { PropTypes } from 'react'; | |||
2 | import Header from './Header'; | 2 | import Header from './Header'; |
3 | import Combobox from './Combobox'; | 3 | import Combobox from './Combobox'; |
4 | import moment from 'moment'; | 4 | import moment from 'moment'; |
5 | import classNames from 'classnames'; | ||
5 | 6 | ||
6 | function noop() { | 7 | function noop() { |
7 | } | 8 | } |
@@ -20,6 +21,7 @@ const Panel = React.createClass({ | |||
20 | propTypes: { | 21 | propTypes: { |
21 | clearText: PropTypes.string, | 22 | clearText: PropTypes.string, |
22 | prefixCls: PropTypes.string, | 23 | prefixCls: PropTypes.string, |
24 | className: PropTypes.string, | ||
23 | defaultOpenValue: PropTypes.object, | 25 | defaultOpenValue: PropTypes.object, |
24 | value: PropTypes.object, | 26 | value: PropTypes.object, |
25 | placeholder: PropTypes.string, | 27 | placeholder: PropTypes.string, |
@@ -79,7 +81,7 @@ const Panel = React.createClass({ | |||
79 | 81 | ||
80 | render() { | 82 | render() { |
81 | const { | 83 | const { |
82 | prefixCls, placeholder, disabledHours, disabledMinutes, | 84 | prefixCls, className, placeholder, disabledHours, disabledMinutes, |
83 | disabledSeconds, hideDisabledOptions, allowEmpty, showHour, showSecond, | 85 | disabledSeconds, hideDisabledOptions, allowEmpty, showHour, showSecond, |
84 | format, defaultOpenValue, clearText, onEsc, | 86 | format, defaultOpenValue, clearText, onEsc, |
85 | } = this.props; | 87 | } = this.props; |
@@ -95,7 +97,7 @@ const Panel = React.createClass({ | |||
95 | const secondOptions = generateOptions(60, disabledSecondOptions, hideDisabledOptions); | 97 | const secondOptions = generateOptions(60, disabledSecondOptions, hideDisabledOptions); |
96 | 98 | ||
97 | return ( | 99 | return ( |
98 | <div className={`${prefixCls}-inner`}> | 100 | <div className={classNames({ [`${prefixCls}-inner`]: true, [className]: className })}> |
99 | <Header | 101 | <Header |
100 | clearText={clearText} | 102 | clearText={clearText} |
101 | prefixCls={prefixCls} | 103 | prefixCls={prefixCls} |