diff --git a/src/components/App.js b/src/components/App.js index 99b47f8..6d8ed79 100644 --- a/src/components/App.js +++ b/src/components/App.js @@ -76,10 +76,20 @@ class App extends React.PureComponent { Object.assign({}, ...this.props.config.topics) : this.props.config.topics; } - static styles() { + static styles(theme) { return { - drawerPaper: { - width: 320 + contentElement: { + transition: theme.transitions.create(["width"], { + easing: theme.transitions.easing.sharp, + duration: theme.transitions.duration.leavingScreen + }) + }, + contentElementShifted: { + width: "calc(100% - 340px)", + transition: theme.transitions.create(["width"], { + easing: theme.transitions.easing.easeOut, + duration: theme.transitions.duration.enteringScreen + }) } }; } @@ -147,8 +157,15 @@ class App extends React.PureComponent { state: this.state.mqttState, changeState: this.changeState }}> - this.setState({ search: s })} /> +
+ this.setState({ search: s })} /> + {this.controlMap(this.state.search)} +
{ {this.state.selectedControl == null || } - {this.controlMap(this.state.search)} ( {props.icon == null || renderRawIcon(props.icon, "mdi-36px")} - + {props.control == null ? "" : props.control.name} - + @@ -49,13 +49,14 @@ const SideBar = (props: Props) => ( ); -const styles = { +const styles = (theme) => ({ drawerPaper: { width: 340 }, - flex: { - flex: 1 + title: { + flex: 1, + marginLeft: theme.spacing.unit } -}; +}); export default withStyles(styles)(SideBar);