summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoramWilander <jwawilander@gmail.com>2015-11-13 10:13:54 -0500
committerJoramWilander <jwawilander@gmail.com>2015-11-13 10:13:54 -0500
commit72832822347c547a56a508ce3d933ff42bb1368a (patch)
tree510a32fab5f1cc0d3c1ac95d8b2c4dcca98c8637
parent1c1cd041c707c9a671e872fe33d96832c1800dc6 (diff)
downloadchat-72832822347c547a56a508ce3d933ff42bb1368a.tar.gz
chat-72832822347c547a56a508ce3d933ff42bb1368a.tar.bz2
chat-72832822347c547a56a508ce3d933ff42bb1368a.zip
Tutorial tip dots are now clickable
-rw-r--r--web/react/components/tutorial/tutorial_tip.jsx27
1 files changed, 14 insertions, 13 deletions
diff --git a/web/react/components/tutorial/tutorial_tip.jsx b/web/react/components/tutorial/tutorial_tip.jsx
index 75d73e920..dd231b816 100644
--- a/web/react/components/tutorial/tutorial_tip.jsx
+++ b/web/react/components/tutorial/tutorial_tip.jsx
@@ -51,21 +51,22 @@ export default class TutorialTip extends React.Component {
const dots = [];
if (this.props.screens.length > 1) {
for (let i = 0; i < this.props.screens.length; i++) {
+ let className = 'circle';
if (i === this.state.currentScreen) {
- dots.push(
- <div
- className='circle active'
- key={'dotactive' + i}
- />
- );
- } else {
- dots.push(
- <div
- className='circle'
- key={'dotinactive' + i}
- />
- );
+ className += ' active';
}
+
+ dots.push(
+ <a
+ href='#'
+ key={'dotactive' + i}
+ className={className}
+ onClick={(e) => { //eslint-disable-line no-loop-func
+ e.preventDefault();
+ this.setState({currentScreen: i});
+ }}
+ />
+ );
}
}