forked from JedWatson/react-select
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstandalone.html
More file actions
48 lines (48 loc) · 1.37 KB
/
standalone.html
File metadata and controls
48 lines (48 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<!doctype html>
<head>
<title>React-Select Example</title>
<link rel="stylesheet" href="example.css">
</head>
<body>
<div class="container">
<h1 style="margin-top: 40px;">React Select</h1>
<h2>Standalone bulid</h2>
<div>For usage without babel / browserify / webpack</div>
<div id="select" style="margin: 20px 0;"></div>
<div class="footer">
Copyright © Jed Watson 2016. MIT Licensed.
</div>
</div>
<script src="//npmcdn.com/react@0.14.2/dist/react.min.js"></script>
<script src="//npmcdn.com/react-dom@0.14.2/dist/react-dom.min.js"></script>
<script src="//npmcdn.com/three.js@0.73.0/build/three.min.js"></script>
<script src="//npmcdn.com/classnames@2.0.0/index.js"></script>
<script src="//npmcdn.com/react-input-autosize@0.6.3/dist/react-input-autosize.min.js"></script>
<script src="standalone.js"></script>
<script>
var options = [
{ label: 'One', value: 1 },
{ label: 'Two', value: 2 },
{ label: 'Three', value: 3 },
];
var Container = React.createClass({
getInitialState () {
return { value: '' };
},
updateValue (value) {
this.setState({ value: value });
},
render () {
return React.createElement(Select, {
options: options,
onChange: this.updateValue,
value: this.state.value,
});
}
});
React.render(
React.createElement(Container),
document.getElementById('select')
);
</script>
</body>