Update MaterialUI

This commit is contained in:
Thomas Nordquist
2019-06-14 11:25:32 +02:00
parent 3935b1d614
commit 6176859c7c
14 changed files with 370 additions and 356 deletions

View File

@@ -10,7 +10,6 @@ import { bindActionCreators } from 'redux'
import { connect } from 'react-redux'
import { default as AceEditor } from 'react-ace'
import { globalActions, publishActions } from '../../../actions'
import { TopicViewModel } from '../../../model/TopicViewModel'
import 'brace/mode/json'
import 'brace/theme/dawn'
import 'brace/theme/monokai'
@@ -301,7 +300,7 @@ class Publish extends React.Component<Props, State> {
private renderEditor() {
return (
<AceEditor
style=""
style={{}}
mode={this.props.editorMode}
theme={this.props.theme.palette.type === 'dark' ? 'monokai' : 'dawn'}
name="UNIQUE_ID_OF_DIV"

View File

@@ -11,7 +11,7 @@ import { AppState } from '../../reducers'
import { bindActionCreators } from 'redux'
import { connect } from 'react-redux'
import { settingsActions, sidebarActions } from '../../actions'
import { StyleRulesCallback, Theme, withStyles } from '@material-ui/core/styles'
import { Theme, withStyles } from '@material-ui/core/styles'
import { TopicViewModel } from '../../model/TopicViewModel'
import {
@@ -186,24 +186,22 @@ const mapDispatchToProps = (dispatch: any) => {
}
}
const styles: StyleRulesCallback<string> = (theme: Theme) => {
return {
drawer: {
display: 'block',
height: '100%',
},
badge: {
top: '3px',
right: '3px',
},
valuePaper: {
margin: theme.spacing(1),
},
heading: {
fontSize: theme.typography.pxToRem(15),
fontWeight: theme.typography.fontWeightRegular,
},
}
}
const styles = (theme: Theme) => ({
drawer: {
display: 'block' as 'block',
height: '100%',
},
badge: {
top: '3px',
right: '3px',
},
valuePaper: {
margin: theme.spacing(1),
},
heading: {
fontSize: theme.typography.pxToRem(15),
fontWeight: theme.typography.fontWeightRegular,
},
})
export default withStyles(styles)(connect(mapStateToProps, mapDispatchToProps)(Sidebar))

View File

@@ -1,7 +1,7 @@
import * as React from 'react'
import * as q from '../../../../backend/src/Model'
import Button from '@material-ui/core/Button'
import { withStyles, Theme, StyleRulesCallback } from '@material-ui/core/styles'
import { withStyles, Theme } from '@material-ui/core/styles'
import { treeActions } from '../../actions'
import { bindActionCreators } from 'redux'
import { connect } from 'react-redux'
@@ -16,9 +16,9 @@ interface Props {
didSelectNode: (node: q.TreeNode<TopicViewModel>) => void
}
const styles: StyleRulesCallback<string> = (theme: Theme) => ({
const styles = (theme: Theme) => ({
button: {
textTransform: 'none',
textTransform: 'none' as 'none',
padding: '3px 5px 3px 5px',
minWidth: '30px',
},

View File

@@ -184,19 +184,17 @@ const mapStateToProps = (state: AppState) => {
}
}
const styles: StyleRulesCallback<string> = (theme: Theme) => {
return {
heading: {
fontSize: theme.typography.pxToRem(15),
fontWeight: theme.typography.fontWeightRegular,
},
toggleButton: {
height: '36px',
},
toggleButtonIcon: {
verticalAlign: 'middle',
},
}
}
const styles = (theme: Theme) => ({
heading: {
fontSize: theme.typography.pxToRem(15),
fontWeight: theme.typography.fontWeightRegular,
},
toggleButton: {
height: '36px',
},
toggleButtonIcon: {
verticalAlign: 'middle',
},
})
export default connect(mapStateToProps, mapDispatchToProps)(withStyles(styles)(ValuePanel))