diff options
author | afc163 <afc163@gmail.com> | 2017-02-20 16:41:50 +0800 |
---|---|---|
committer | afc163 <afc163@gmail.com> | 2017-02-20 16:41:50 +0800 |
commit | 7967d52afc0bb7edee7dc26f30d291970a0d81a7 (patch) | |
tree | f1484a6ca6409193a3e7c69b74c6233f1b86f934 /examples/open.js | |
parent | bb0a25cb853ddbd2971bf1d0c74b6c4694015367 (diff) | |
download | time-picker-7967d52afc0bb7edee7dc26f30d291970a0d81a7.tar.gz time-picker-7967d52afc0bb7edee7dc26f30d291970a0d81a7.tar.zst time-picker-7967d52afc0bb7edee7dc26f30d291970a0d81a7.zip |
Updates
Diffstat (limited to 'examples/open.js')
-rw-r--r-- | examples/open.js | 70 |
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 @@ | |||
1 | webpackJsonp([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 | ||