Refactor
This commit is contained in:
@@ -46,8 +46,8 @@ class ProfileList extends React.Component<Props, {}> {
|
|||||||
|
|
||||||
const styles = (theme: Theme) => ({
|
const styles = (theme: Theme) => ({
|
||||||
list: {
|
list: {
|
||||||
marginTop: `${theme.spacing.unit}px`,
|
marginTop: theme.spacing(1),
|
||||||
height: `calc(100% - ${theme.spacing.unit * 6}px)`,
|
height: `calc(100% - ${theme.spacing(6)})`,
|
||||||
overflowY: 'auto' as 'auto',
|
overflowY: 'auto' as 'auto',
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -4,15 +4,15 @@ import { Badge, Typography } from '@material-ui/core'
|
|||||||
import { Theme, withStyles } from '@material-ui/core/styles'
|
import { Theme, withStyles } from '@material-ui/core/styles'
|
||||||
|
|
||||||
interface HistoryItem {
|
interface HistoryItem {
|
||||||
title: string
|
title: JSX.Element | string
|
||||||
value: string
|
value: string | any
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
items: HistoryItem[]
|
items: HistoryItem[]
|
||||||
onClick?: (index: number, element: EventTarget) => void
|
onClick?: (index: number, element: EventTarget) => void
|
||||||
classes: any
|
classes: any
|
||||||
contentTypeIndicator?: String
|
contentTypeIndicator?: JSX.Element
|
||||||
}
|
}
|
||||||
|
|
||||||
interface State {
|
interface State {
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ class MessageHistory extends React.Component<Props, State> {
|
|||||||
<div>
|
<div>
|
||||||
<History
|
<History
|
||||||
items={historyElements}
|
items={historyElements}
|
||||||
contentTypeIndicator={showPlot ? <BarChart /> : null}
|
contentTypeIndicator={showPlot ? <BarChart /> : undefined}
|
||||||
onClick={this.displayMessage}
|
onClick={this.displayMessage}
|
||||||
>
|
>
|
||||||
{showPlot ? this.renderPlot(numericMessages) : null}
|
{showPlot ? this.renderPlot(numericMessages) : null}
|
||||||
|
|||||||
@@ -170,7 +170,6 @@ class Sidebar extends React.Component<Props, State> {
|
|||||||
size="small"
|
size="small"
|
||||||
color="secondary"
|
color="secondary"
|
||||||
variant="contained"
|
variant="contained"
|
||||||
mini={true}
|
|
||||||
style={{ marginTop: '-3px', padding: '0px 4px', minHeight: '24px' }}
|
style={{ marginTop: '-3px', padding: '0px 4px', minHeight: '24px' }}
|
||||||
onClick={this.props.actions.clearRetainedTopic}
|
onClick={this.props.actions.clearRetainedTopic}
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user