diff --git a/src/components/Tutorial/StepperVertical.js b/src/components/Tutorial/StepperVertical.js index c8772a9..34c94a8 100644 --- a/src/components/Tutorial/StepperVertical.js +++ b/src/components/Tutorial/StepperVertical.js @@ -8,12 +8,12 @@ import { tutorials } from './tutorials'; import { fade } from '@material-ui/core/styles/colorManipulator'; import { withStyles } from '@material-ui/core/styles'; +import withWidth, { isWidthUp } from '@material-ui/core/withWidth'; import Button from '@material-ui/core/Button'; import Stepper from '@material-ui/core/Stepper'; import Step from '@material-ui/core/Step'; import StepLabel from '@material-ui/core/StepLabel'; import Tooltip from '@material-ui/core/Tooltip'; -import LinearProgress from '@material-ui/core/LinearProgress'; const styles = (theme) => ({ verticalStepper: { @@ -115,71 +115,72 @@ class StepperVertical extends Component { var tutorialId = this.state.tutorialId; var verticalTutorialId = this.state.verticalTutorialId; return ( -
- -
-
-
-
-
-
-
-
} - classes={{root: this.props.classes.verticalStepper}} + isWidthUp('sm', this.props.width) ? +
+
- - -
+ clsx(this.props.classes.stepIconLarge, this.props.classes.stepIconActive) + : this.props.classes.stepIconLarge + : tutorial === tutorials[verticalTutorialId-2] || tutorial === tutorials[verticalTutorialId] ? + tutorial === tutorials[tutorialId-1] ? + clsx(this.props.classes.stepIconMedium, this.props.classes.stepIconActive) + : this.props.classes.stepIconMedium + : tutorial === tutorials[tutorialId-1] ? + clsx(this.props.classes.stepIconSmall, this.props.classes.stepIconActive) + : this.props.classes.stepIconSmall + }} + > + + + + + )})} + + + + + : null ); }; } -export default withRouter(withStyles(styles, {withTheme: true})(StepperVertical)); +export default withRouter(withStyles(styles, {withTheme: true})(withWidth()(StepperVertical))); diff --git a/src/components/Tutorial/Tutorial.js b/src/components/Tutorial/Tutorial.js index b9335a2..bee67cc 100644 --- a/src/components/Tutorial/Tutorial.js +++ b/src/components/Tutorial/Tutorial.js @@ -13,6 +13,7 @@ import NotFound from '../NotFound'; import { tutorials } from './tutorials'; import { initialXml } from '../Blockly/initialXml.js'; +import withWidth, { isWidthUp } from '@material-ui/core/withWidth'; import Tabs from '@material-ui/core/Tabs'; import Tab from '@material-ui/core/Tab'; import Grid from '@material-ui/core/Grid'; @@ -58,7 +59,7 @@ class Tutorial extends Component { {/* width of vertical stepper is 30px*/} - +