aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authoryiminghe <yiminghe@gmail.com>2016-09-26 17:38:19 +0800
committerGitHub <noreply@github.com>2016-09-26 17:38:19 +0800
commitec0805acf4f81286d56b43c431fd6a89f5bf743a (patch)
tree2a06ce02bdd281c777aef0f6a2eef5093e424a64
parent3d4a763813161e575db61737f46879072b1983e9 (diff)
parentc6a1a235f9ff6de74cae402c7359b25fa655a537 (diff)
downloadtime-picker-ec0805acf4f81286d56b43c431fd6a89f5bf743a.tar.gz
time-picker-ec0805acf4f81286d56b43c431fd6a89f5bf743a.tar.zst
time-picker-ec0805acf4f81286d56b43c431fd6a89f5bf743a.zip
Merge pull request #22 from react-component/chore-classname
chore: add className for Panel
-rw-r--r--src/Panel.jsx6
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';
2import Header from './Header'; 2import Header from './Header';
3import Combobox from './Combobox'; 3import Combobox from './Combobox';
4import moment from 'moment'; 4import moment from 'moment';
5import classNames from 'classnames';
5 6
6function noop() { 7function 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}