forked from fakiolinho/react-loading
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
92 lines (90 loc) · 2.49 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<!doctype html>
<html>
<head>
<meta charset="utf-8"/>
<title>React Loading</title>
<style>
body {
font-family: "Helvetica Neue", Helvetica, sans-serif;
font-weight: 200;
margin: 0 auto;
width: 750px;
}
textarea {
font-family: monospace;
font-size: inherit;
height: 150px;
width: 100%;
}
pre {
white-space: pre-wrap;
}
label {
display: block;
}
</style>
</head>
<body>
<script src="//fb.me/react-with-addons-0.13.3.js"></script>
<script src="//fb.me/JSXTransformer-0.13.3.js"></script>
<script src="dist/react-loading.js"></script>
<script type="text/jsx">
var App = React.createClass({
getInitialState: function() {
return {
type: 'balls'
};
},
render: function () {
return (
<div>
<h1>react-loading</h1>
<div>
<Loading type={this.state.type} color='#000' height={128} width={128} />
</div>
<div>
<h3>loading animation:</h3>
<label>
<input name='type' type='radio' value='balls' defaultChecked={true} onChange={this.onInputTypeChange} />
balls
</label>
<label>
<input name='type' type='radio' value='bars' onChange={this.onInputTypeChange} />
bars
</label>
<label>
<input name='type' type='radio' value='bubbles' onChange={this.onInputTypeChange} />
bubbles
</label>
<label>
<input name='type' type='radio' value='cubes' onChange={this.onInputTypeChange} />
cubes
</label>
<label>
<input name='type' type='radio' value='cylon' onChange={this.onInputTypeChange} />
cylon
</label>
<label>
<input name='type' type='radio' value='spin' onChange={this.onInputTypeChange} />
spin
</label>
<label>
<input name='type' type='radio' value='spinningBubbles' onChange={this.onInputTypeChange} />
spinningBubbles
</label>
<label>
<input name='type' type='radio' value='spokes' onChange={this.onInputTypeChange} />
spokes
</label>
</div>
</div>
);
},
onInputTypeChange: function(e) {
this.setState({type: e.target.value});
}
});
React.render(<App/>, document.body);
</script>
</body>
</html>