This repository has been archived by the owner on Dec 2, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27
/
App.js
101 lines (97 loc) · 3.09 KB
/
App.js
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
93
94
95
96
97
98
99
100
101
import React, { Component } from "react";
import randomColor from "randomcolor";
import TagCloud from "react-tag-cloud";
import CloudItem from "./CloudItem";
const styles = {
large: {
fontSize: 60,
fontWeight: "bold"
},
small: {
opacity: 0.7,
fontSize: 16
}
};
class App extends Component {
componentDidMount() {
setInterval(() => {
this.forceUpdate();
}, 3000);
}
render() {
return (
<div className="app-outer">
<div className="app-inner">
<h1>react-tag-cloud demo</h1>
<TagCloud
className="tag-cloud"
rotate={() => Math.round(Math.random()) * 90}
style={{
fontFamily: "sans-serif",
// fontSize: () => Math.round(Math.random() * 50) + 16,
fontSize: 30,
color: () =>
randomColor({
hue: "blue"
}),
padding: 5
}}
>
<div
style={{
fontFamily: "serif",
fontSize: 40,
fontStyle: "italic",
fontWeight: "bold",
color: randomColor()
}}
>
Futurama
</div>
<CloudItem text="Custom item, Hover me!" />
<CloudItem text="Custom item 2, Hover me!" />
<div style={styles.large}>Transformers</div>
<div style={styles.large}>Simpsons</div>
<div style={styles.large}>Dragon Ball</div>
<div style={styles.large}>Rick & Morty</div>
<div style={{ fontFamily: "courier" }}>He man</div>
<div style={{ fontSize: 30 }}>World trigger</div>
<div style={{ fontStyle: "italic" }}>Avengers</div>
<div style={{ fontWeight: 200 }}>Family Guy</div>
<div style={{ color: "green" }}>American Dad</div>
<div className="tag-item-wrapper">
<div>Hover Me Please!</div>
<div className="tag-item-tooltip">HOVERED!</div>
</div>
<div>Gobots</div>
<div>Thundercats</div>
<div>M.A.S.K.</div>
<div>GI Joe</div>
<div>Inspector Gadget</div>
<div>Bugs Bunny</div>
<div>Tom & Jerry</div>
<div>Cowboy Bebop</div>
<div>Evangelion</div>
<div>Bleach</div>
<div>GITS</div>
<div>Pokemon</div>
<div>She Ra</div>
<div>Fullmetal Alchemist</div>
<div>Gundam</div>
<div>Uni Taisen</div>
<div>Pinky and the Brain</div>
<div>Bobs Burgers</div>
<div style={styles.small}>Dino Riders</div>
<div style={styles.small}>Silverhawks</div>
<div style={styles.small}>Bravestar</div>
<div style={styles.small}>Starcom</div>
<div style={styles.small}>Cops</div>
<div style={styles.small}>Alfred J. Kwak</div>
<div style={styles.small}>Dr Snuggles</div>
</TagCloud>
</div>
</div>
);
}
}
export default App;