From 72832822347c547a56a508ce3d933ff42bb1368a Mon Sep 17 00:00:00 2001 From: JoramWilander Date: Fri, 13 Nov 2015 10:13:54 -0500 Subject: Tutorial tip dots are now clickable --- web/react/components/tutorial/tutorial_tip.jsx | 27 +++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'web/react/components') 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( -
- ); - } else { - dots.push( -
- ); + className += ' active'; } + + dots.push( + { //eslint-disable-line no-loop-func + e.preventDefault(); + this.setState({currentScreen: i}); + }} + /> + ); } } -- cgit v1.2.3-1-g7c22