aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/open.js
diff options
context:
space:
mode:
Diffstat (limited to 'examples/open.js')
-rw-r--r--examples/open.js70
1 files changed, 70 insertions, 0 deletions
diff --git a/examples/open.js b/examples/open.js
new file mode 100644
index 0000000..fc09fdd
--- /dev/null
+++ b/examples/open.js
@@ -0,0 +1,70 @@
1webpackJsonp([3],{
2
3/***/ 0:
4/***/ function(module, exports, __webpack_require__) {
5
6 module.exports = __webpack_require__(268);
7
8
9/***/ },
10
11/***/ 268:
12/***/ function(module, exports, __webpack_require__) {
13
14 'use strict';
15
16 __webpack_require__(2);
17
18 var _react = __webpack_require__(3);
19
20 var _react2 = _interopRequireDefault(_react);
21
22 var _reactDom = __webpack_require__(34);
23
24 var _reactDom2 = _interopRequireDefault(_reactDom);
25
26 var _rcTimePicker = __webpack_require__(181);
27
28 var _rcTimePicker2 = _interopRequireDefault(_rcTimePicker);
29
30 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
31
32 /* eslint no-console:0 */
33
34 var App = _react2.default.createClass({
35 displayName: 'App',
36 getInitialState: function getInitialState() {
37 return {
38 open: false
39 };
40 },
41 setOpen: function setOpen(_ref) {
42 var open = _ref.open;
43
44 this.setState({ open: open });
45 },
46 toggleOpen: function toggleOpen() {
47 this.setState({
48 open: !this.state.open
49 });
50 },
51 render: function render() {
52 return _react2.default.createElement(
53 'div',
54 null,
55 _react2.default.createElement(
56 'button',
57 { onClick: this.toggleOpen },
58 'Toggle open'
59 ),
60 _react2.default.createElement(_rcTimePicker2.default, { open: this.state.open, onOpen: this.setOpen, onClose: this.setOpen })
61 );
62 }
63 });
64
65 _reactDom2.default.render(_react2.default.createElement(App, null), document.getElementById('__react-content'));
66
67/***/ }
68
69});
70//# sourceMappingURL=open.js.map \ No newline at end of file