aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/open.html
diff options
context:
space:
mode:
Diffstat (limited to 'examples/open.html')
-rw-r--r--examples/open.html321
1 files changed, 321 insertions, 0 deletions
diff --git a/examples/open.html b/examples/open.html
new file mode 100644
index 0000000..ece9dc4
--- /dev/null
+++ b/examples/open.html
@@ -0,0 +1,321 @@
1<!DOCTYPE html>
2<html>
3
4<head>
5 <title>open.js - example - rc-time-picker@2.2.2</title>
6 <meta name="viewport"
7 content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
8 <meta charset="utf-8"/>
9 <meta http-equiv="X-UA-Compatible" content="IE=edge">
10 <link href="https://a.alipayobjects.com/normalize.css/3.0.1/normalize.css" rel="stylesheet"/>
11 <style>
12 .highlight pre {
13 padding: .8em 1em;
14 font: 14px/20px Consolas, Monaco, 'Andale Mono', monospace;
15 border: 1px solid #e5e8ec;
16 border-radius: 3px;
17 background-color: #21221d;
18 background-image: -webkit-linear-gradient(#21221d 50%, #272822 50%);
19 background-image: -moz-linear-gradient(#21221d 50%, #272822 50%);
20 background-image: -ms-linear-gradient(#21221d 50%, #272822 50%);
21 background-image: -o-linear-gradient(#21221d 50%, #272822 50%);
22 background-image: linear-gradient(#21221d 50%, #272822 50%);
23 background-size: 40px 40px;
24 background-origin: content-box;
25 overflow: auto;
26 -webkit-overflow-scrolling: touch;
27 }
28
29 .highlight pre > code {
30 font-family: inherit;
31 direction: ltr;
32 text-align: left;
33 white-space: pre;
34 word-spacing: normal;
35 vertical-align: 2px;
36 display: block;
37 -moz-tab-size: 2;
38 -o-tab-size: 2;
39 tab-size: 2;
40 -webkit-hyphens: none;
41 -moz-hyphens: none;
42 -ms-hyphens: none;
43 hyphens: none;
44 color: #E5E5C2;
45 }
46 </style>
47 <style>
48/*
49
50Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-license.org/
51
52*/
53
54.hljs {
55 display: block;
56 overflow-x: auto;
57 padding: 0.5em;
58 background: #23241f;
59 -webkit-text-size-adjust: none;
60}
61
62.hljs,
63.hljs-tag,
64.css .hljs-rule,
65.css .hljs-value,
66.aspectj .hljs-function,
67.css .hljs-function
68.hljs-preprocessor,
69.hljs-pragma {
70 color: #f8f8f2;
71}
72
73.hljs-strongemphasis,
74.hljs-strong,
75.hljs-emphasis {
76 color: #a8a8a2;
77}
78
79.hljs-bullet,
80.hljs-blockquote,
81.hljs-horizontal_rule,
82.hljs-number,
83.hljs-regexp,
84.alias .hljs-keyword,
85.hljs-literal,
86.hljs-hexcolor {
87 color: #ae81ff;
88}
89
90.hljs-code,
91.hljs-title,
92.css .hljs-class,
93.hljs-class .hljs-title:last-child {
94 color: #a6e22e;
95 /*color: #e6db74;*/
96}
97
98.hljs-link_url {
99 font-size: 80%;
100}
101
102.hljs-strong,
103.hljs-strongemphasis {
104 font-weight: bold;
105}
106
107.hljs-emphasis,
108.hljs-strongemphasis,
109.hljs-class .hljs-title:last-child,
110.hljs-typename {
111 font-style: italic;
112}
113
114.hljs-keyword,
115.ruby .hljs-class .hljs-keyword:first-child,
116.ruby .hljs-function .hljs-keyword,
117.hljs-function,
118.hljs-change,
119.hljs-winutils,
120.hljs-flow,
121.nginx .hljs-title,
122.tex .hljs-special,
123.hljs-header,
124.hljs-symbol,
125.hljs-symbol .hljs-string,
126.hljs-tag .hljs-title,
127.hljs-value,
128.alias .hljs-keyword:first-child,
129.css .hljs-tag,
130.css .unit,
131.css .hljs-important {
132 color: #f92672;
133}
134
135.hljs-function .hljs-keyword,
136.hljs-class .hljs-keyword:first-child,
137.hljs-aspect .hljs-keyword:first-child,
138.hljs-constant,
139.hljs-typename,
140.hljs-name,
141.css .hljs-attribute {
142 color: #66d9ef;
143}
144
145.hljs-variable,
146.hljs-params,
147.hljs-class .hljs-title,
148.hljs-aspect .hljs-title {
149 color: #f8f8f2;
150}
151
152.hljs-tag .hljs-value,
153.hljs-string,
154.css .hljs-id,
155.hljs-subst,
156.hljs-type,
157.ruby .hljs-class .hljs-parent,
158.django .hljs-template_tag,
159.django .hljs-variable,
160.smalltalk .hljs-class,
161.django .hljs-filter .hljs-argument,
162.smalltalk .hljs-localvars,
163.smalltalk .hljs-array,
164.hljs-attr_selector,
165.hljs-pseudo,
166.hljs-addition,
167.hljs-stream,
168.hljs-envvar,
169.apache .hljs-tag,
170.apache .hljs-cbracket,
171.tex .hljs-command,
172.hljs-prompt,
173.hljs-link_label,
174.hljs-link_url {
175 color: #e6db74;
176}
177
178.hljs-comment,
179.hljs-annotation,
180.hljs-decorator,
181.hljs-pi,
182.hljs-doctype,
183.hljs-deletion,
184.hljs-shebang,
185.apache .hljs-sqbracket,
186.tex .hljs-formula {
187 color: #75715e;
188}
189
190.coffeescript .javascript,
191.javascript .xml,
192.tex .hljs-formula,
193.xml .javascript,
194.xml .vbscript,
195.xml .css,
196.xml .hljs-cdata,
197.xml .php,
198.php .xml {
199 opacity: 0.5;
200}
201/***********/
202.hljs-attribute{
203 color: #a6e22e;
204}
205/***** node keyword ******/
206.hljs-built_in{
207 color: #3396dc;
208 font-weight: bold;
209}
210 </style>
211 <style>
212 .container {
213 width: 86%;
214 max-width: 1000px;
215 margin-left: auto;
216 margin-right: auto;
217 }
218
219 .header p {
220 color: #666;
221 }
222
223 .example {
224 padding: 20px 0;
225 }
226 </style>
227
228 <script>
229 // Console-polyfill. MIT license.
230 // https://github.com/paulmillr/console-polyfill
231 // Make it safe to do console.log() always.
232 (function (global) {
233 'use strict';
234 global.console = global.console || {};
235 var con = global.console;
236 var prop, method;
237 var empty = {};
238 var dummy = function () {
239 };
240 var properties = 'memory'.split(',');
241 var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' +
242 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' +
243 'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',');
244 while (prop = properties.pop()) con[prop] = con[prop] || empty;
245 while (method = methods.pop()) con[method] = con[method] || dummy;
246 })(typeof window === 'undefined' ? this : window);
247 // Using `this` for web workers while maintaining compatibility with browser
248 // targeted script loaders such as Browserify or Webpack where the only way to
249 // get to the global object is via `window`.
250 </script>
251 <!--[if lt IE 9]>
252 <script src="https://a.alipayobjects.com/??es5-shim/4.0.5/es5-shim.js,es5-shim/4.0.5/es5-sham.js,html5shiv/3.7.2/src/html5shiv.js"></script>
253 <![endif]-->
254 <script src="https://as.alipayobjects.com/g/component/??modernizr/2.8.3/modernizr.js,fastclick/1.0.6/fastclick.js"></script>
255 <script>
256 if(!window.Promise) {
257 document.writeln('<script src="https://as.alipayobjects.com/g/component/es6-promise/3.2.2/es6-promise.min.js"'+'>'+'<'+'/'+'script>');
258 }
259 </script>
260 <link rel="stylesheet" href="common.css" />
261</head>
262
263<body>
264 <div class="container">
265 <div class="header">
266 <h1>rc-time-picker@2.2.2</h1>
267
268 <p>React TimePicker</p>
269 </div>
270 <div class="example" id="__react-content"></div>
271
272 <div class="highlight"><pre><code language="js"><span class="hljs-comment">/* eslint no-console:0 */</span>
273
274<span class="hljs-keyword">import</span> <span class="hljs-string">'rc-time-picker/assets/index.css'</span>;
275
276<span class="hljs-keyword">import</span> React <span class="hljs-keyword">from</span> <span class="hljs-string">'react'</span>;
277<span class="hljs-keyword">import</span> ReactDom <span class="hljs-keyword">from</span> <span class="hljs-string">'react-dom'</span>;
278<span class="hljs-keyword">import</span> TimePicker <span class="hljs-keyword">from</span> <span class="hljs-string">'rc-time-picker'</span>;
279
280<span class="hljs-keyword">const</span> App = React.createClass({
281 getInitialState() {
282 <span class="hljs-keyword">return</span> {
283 open: <span class="hljs-literal">false</span>,
284 };
285 },
286 setOpen({ open }) {
287 <span class="hljs-keyword">this</span>.setState({ open });
288 },
289 toggleOpen() {
290 <span class="hljs-keyword">this</span>.setState({
291 open: !<span class="hljs-keyword">this</span>.state.open,
292 });
293 },
294 render() {
295 <span class="hljs-keyword">return</span> (
296 <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-title">div</span>&gt;</span>
297 <span class="hljs-tag">&lt;<span class="hljs-title">button</span> <span class="hljs-attribute">onClick</span>=<span class="hljs-value">{this.toggleOpen}</span>&gt;</span>Toggle open<span class="hljs-tag">&lt;/<span class="hljs-title">button</span>&gt;</span>
298 <span class="hljs-tag">&lt;<span class="hljs-title">TimePicker</span> <span class="hljs-attribute">open</span>=<span class="hljs-value">{this.state.open}</span> <span class="hljs-attribute">onOpen</span>=<span class="hljs-value">{this.setOpen}</span> <span class="hljs-attribute">onClose</span>=<span class="hljs-value">{this.setOpen}</span> /&gt;</span>
299 <span class="hljs-tag">&lt;/<span class="hljs-title">div</span>&gt;</span>
300 )</span>;
301 },
302});
303
304ReactDom.render(
305 <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-title">App</span> /&gt;</span>,
306 document.getElementById('__react-content')
307);
308</span></code></pre></div>
309 </div>
310 <a href="http://github.com/react-component/time-picker">
311 <img style="position: absolute; top: 0; right: 0; border: 0;"
312 src="https://camo.githubusercontent.com/38ef81f8aca64bb9a64448d0d70f1308ef5341ab/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67"
313 alt="Fork me on GitHub"
314 data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png">
315 </a>
316 <script>FastClick.attach(document.body);</script>
317 <script src="common.js?nowrap"></script>
318 <script src="open.js?nowrap"></script>
319</body>
320
321</html>