-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
57 lines (45 loc) · 1.33 KB
/
index.html
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
49
50
51
52
53
54
55
56
57
<html>
<head>
<title>React Typescript Rollup Scaffold</title>
<style>
body {
background-color: #f4f2e7;
}
.wrapper {
margin: 0 auto;
width: 350px
}
</style>
<link rel="stylesheet" type="text/css" href="./dist/simple_datepicker.css"></link>
<script crossorigin src="https://unpkg.com/react@16/umd/react.development.js"></script>
<script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script>
<script crossorigin src="https://unpkg.com/babel-standalone@6.15.0/babel.min.js"></script>
<script src="./dist/simple_datepicker.umd.min.js"></script>
<script type="text/babel">
class DemoContainer extends React.Component {
constructor(props) {
super(props);
this.state = {
value: new Date()
}
this.onValueChange = this.onValueChange.bind(this);
}
onValueChange(value) {
this.setState({ value });
}
render() {
return <SimpleDatePicker.SimpleDatePicker value={this.state.value} onChange={this.onValueChange} />;
}
}
ReactDOM.render(
<div className="wrapper">
<DemoContainer />
</div>,
document.getElementById('root')
);
</script>
</head>
<body>
<div id="root"></div>
</body>
</html>