show vertical stepper not on extrasmall displays
This commit is contained in:
parent
7148d66d19
commit
c11ff8fc6c
@ -8,12 +8,12 @@ import tutorials from './tutorials.json';
|
||||
|
||||
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,6 +115,7 @@ class StepperVertical extends Component {
|
||||
var tutorialId = this.state.tutorialId;
|
||||
var verticalTutorialId = this.state.verticalTutorialId;
|
||||
return (
|
||||
isWidthUp('sm', this.props.width) ?
|
||||
<div style={{marginRight: '10px'}}>
|
||||
<Button
|
||||
style={{minWidth: '30px', margin: 'auto', minHeight: '25px', padding: '0', writingMode: 'vertical-rl'}}
|
||||
@ -176,10 +177,10 @@ class StepperVertical extends Component {
|
||||
>
|
||||
{'>'}
|
||||
</Button>
|
||||
|
||||
</div>
|
||||
: null
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
export default withRouter(withStyles(styles, {withTheme: true})(StepperVertical));
|
||||
export default withRouter(withStyles(styles, {withTheme: true})(withWidth()(StepperVertical)));
|
||||
|
@ -9,6 +9,7 @@ import NotFound from '../NotFound';
|
||||
|
||||
import tutorials from './tutorials.json';
|
||||
|
||||
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';
|
||||
@ -47,7 +48,7 @@ class Tutorial extends Component {
|
||||
<StepperVertical />
|
||||
|
||||
{/* width of vertical stepper is 30px*/}
|
||||
<Card style={{width: 'calc(100% - 30px)', padding: '10px'}}>
|
||||
<Card style={{width: isWidthUp('sm', this.props.width) ? 'calc(100% - 30px)' : '100%', padding: '10px'}}>
|
||||
<Tabs
|
||||
value={this.state.value}
|
||||
indicatorColor="primary"
|
||||
@ -85,4 +86,4 @@ class Tutorial extends Component {
|
||||
};
|
||||
}
|
||||
|
||||
export default Tutorial;
|
||||
export default withWidth()(Tutorial);
|
||||
|
Loading…
x
Reference in New Issue
Block a user