UNPKG

1.59 kBHTMLView Raw
1<!DOCTYPE HTML>
2<html>
3 <head>
4 <meta charset="utf-8">
5 <script src="http://fb.me/react-with-addons-0.12.2.min.js"></script>
6 <script src="http://fb.me/JSXTransformer-0.12.2.js"></script>
7 <script src="../dist/react-typeahead.js"></script>
8 </head>
9 <body>
10 <style>
11 .hover {
12 border-style: dotted;
13 border-width: 1px;
14 background-color: LightGray;
15 margin: -1px;
16 }
17 .typeahead-selector {
18 margin: 0;
19 padding: 4px 0px 4px 0px;
20 position: absolute;
21 border-style: solid;
22 border-width: 1px 2px 2px 1px;
23 background-color: white;
24 }
25 .typeahead-option {
26 padding: 0px 4px 0px 4px;
27 }
28 .typeahead-token {
29 border-style: solid;
30 border-color: gray;
31 border-width: 1px 2px 2px 1px;
32 padding: 1px 5px 1px 5px;
33 margin-right: 4px;
34 display: inline;
35 border-radius: 5px;
36 }
37 .typeahead, .typeahead input, #example, .typeahead-tokenizer {
38 display: inline;
39 }
40 .typeahead-token-close {
41 text-decoration: none;
42 margin-left: 8px;
43 }
44 </style>
45
46 <form>
47 <div id="example"></div>
48 <script type="text/jsx">
49 /** @jsx React.DOM */
50 React.render(
51 <ReactTypeahead.Tokenizer defaultValue="foo"
52 name="spamselect"
53 options={
54 ["foobar", "spameggs", "hameggs",
55 "spamfoo", "spam"]} />,
56 document.getElementById("example")
57 );
58 </script>
59 <input type="submit"></input>
60 </form>
61 <hr />
62 This is a footer
63 </body>
64</html>