diff options
author | Benjy Cui <benjytrys@gmail.com> | 2016-09-26 17:33:15 +0800 |
---|---|---|
committer | Benjy Cui <benjytrys@gmail.com> | 2016-09-26 17:35:30 +0800 |
commit | c6a1a235f9ff6de74cae402c7359b25fa655a537 (patch) | |
tree | 2a06ce02bdd281c777aef0f6a2eef5093e424a64 | |
parent | 3d4a763813161e575db61737f46879072b1983e9 (diff) | |
download | time-picker-c6a1a235f9ff6de74cae402c7359b25fa655a537.tar.gz time-picker-c6a1a235f9ff6de74cae402c7359b25fa655a537.tar.zst time-picker-c6a1a235f9ff6de74cae402c7359b25fa655a537.zip |
chore: add className for Panel
-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} |