From b86fe1d16a4ad06951bba9ac2990ec3e4563637a Mon Sep 17 00:00:00 2001
From: Artem Vasiliev <artem.job@gmail.com>
Date: Thu, 20 Oct 2016 00:00:17 +0300
Subject: feat: 'addon' property support

..to be able to render something like OK button to timepicker:
```
            <TimePicker
              allowEmpty={false}
              addon={panel => {
                return (
                  <div className="row">
                    <a role="button" className="btn btn-sm btn-default" onClick={() => panel.close()}>
                      {__('OK')}
                    </a>
                  </div>
                )
              }}
            />

```
---
 src/TimePicker.jsx | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'src/TimePicker.jsx')

diff --git a/src/TimePicker.jsx b/src/TimePicker.jsx
index 58f6ea1..358b596 100644
--- a/src/TimePicker.jsx
+++ b/src/TimePicker.jsx
@@ -39,6 +39,7 @@ const Picker = React.createClass({
     onChange: PropTypes.func,
     onOpen: PropTypes.func,
     onClose: PropTypes.func,
+    addon: PropTypes.func,
   },
 
   getDefaultProps() {
@@ -61,6 +62,7 @@ const Picker = React.createClass({
       onChange: noop,
       onOpen: noop,
       onClose: noop,
+      addon: noop,
     };
   },
 
@@ -137,6 +139,7 @@ const Picker = React.createClass({
       prefixCls, placeholder, disabledHours,
       disabledMinutes, disabledSeconds, hideDisabledOptions,
       allowEmpty, showHour, showSecond, defaultOpenValue, clearText,
+      addon,
     } = this.props;
     return (
       <Panel
@@ -157,6 +160,7 @@ const Picker = React.createClass({
         disabledMinutes={disabledMinutes}
         disabledSeconds={disabledSeconds}
         hideDisabledOptions={hideDisabledOptions}
+        addon={addon}
       />
     );
   },
-- 
cgit v1.2.3

