Make everything compatible with the latest material-ui version

This commit is contained in:
uwap 2018-04-08 10:28:46 +02:00
parent 4b370889af
commit f2cc0eaa2a
5 changed files with 10 additions and 8 deletions

View file

@ -31,7 +31,7 @@ class SideBar extends React.Component<SideBarProps & Classes, SideBarState> {
static styles(_theme: Object): Object {
return {
drawerPaper: {
width: 320
width: 340
},
flex: {
flex: 1
@ -49,13 +49,13 @@ class SideBar extends React.Component<SideBarProps & Classes, SideBarState> {
anchor="right"
onRequestClose={this.close}
classes={{paper: this.props.classes.drawerPaper}}
type="persistent"
variant="persistent"
>
<AppBar position="static">
<Toolbar>
{this.props.icon == null
|| renderIcon(this.props.icon, "mdi-36px")}
<Typography type="title" className={this.props.classes.flex}>
<Typography variant="title" className={this.props.classes.flex}>
{this.props.control == null || this.props.control.name}
</Typography>
<IconButton onClick={this.close.bind(this)}>

View file

@ -25,7 +25,7 @@ export default class TopBar extends React.Component<TopBarProps, TopBarState> {
<AppBar position="static">
<Toolbar>
{this.renderConnectionIndicator()}
<Typography type="title">{this.props.title}</Typography>
<Typography variant="title">{this.props.title}</Typography>
</Toolbar>
</AppBar>
);

View file

@ -134,7 +134,8 @@ export class Toggle extends UiControl<UIToggle> {
<Switch label={this.props.item.text}
checked={this.isToggled()}
onChange={this.runPrimaryAction}
disabled={!this.isEnabled()} />
disabled={!this.isEnabled()}
color="primary" />
</ListItemSecondaryAction>
];
}
@ -195,7 +196,8 @@ export class Link extends UiItem<UILink> {
render() {
return (
<Button raised
<Button
variant="raised"
onClick={this.runPrimaryAction}
color="primary"
disabled={!this.isEnabled()}

View file

@ -123,7 +123,7 @@ export default class UiItemList extends React.Component<UiItemListProps> {
on(control.delayedApply)();
}}
onDragStop={on(false)}
style={{width: 100}}
style={{width: 100, marginTop: 54}}
/></MuiThemeProvider>
</ListItemSecondaryAction>
];

View file

@ -41,7 +41,7 @@ module.exports = env => merge(common, {
'NODE_ENV': JSON.stringify('production')
}
}),
new LodashModuleReplacementPlugin(),
// new LodashModuleReplacementPlugin(),
new webpack.optimize.OccurrenceOrderPlugin(),
new webpack.HashedModuleIdsPlugin(),
new webpack.optimize.AggressiveMergingPlugin()