Fix IconButton shapes and positioning

Fixes #106
This commit is contained in:
Thomas Nordquist
2019-04-15 22:40:16 +02:00
parent 0ec539854c
commit a28fc958d4
3 changed files with 9 additions and 3 deletions

View File

@@ -117,6 +117,7 @@ const style = (theme: Theme) => {
font: "12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace", font: "12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace",
display: 'inline-grid' as 'inline-grid', display: 'inline-grid' as 'inline-grid',
margin: '0', margin: '0',
padding: '1px 0 2px 0',
} }
return { return {

View File

@@ -19,7 +19,6 @@ import {
ExpansionPanelDetails, ExpansionPanelDetails,
ExpansionPanelSummary, ExpansionPanelSummary,
Typography, Typography,
Tooltip,
Badge, Badge,
} from '@material-ui/core' } from '@material-ui/core'
@@ -71,7 +70,7 @@ class Sidebar extends React.Component<Props, State> {
return ( return (
<CustomIconButton onClick={() => this.deleteTopic(this.props.node)} tooltip="Clear this topic"> <CustomIconButton onClick={() => this.deleteTopic(this.props.node)} tooltip="Clear this topic">
<Delete /> <Delete style={{ marginTop: '-3px' }} />
</CustomIconButton> </CustomIconButton>
) )
} }
@@ -90,7 +89,7 @@ class Sidebar extends React.Component<Props, State> {
color="secondary" color="secondary"
> >
<CustomIconButton onClick={() => this.deleteTopic(this.props.node, true, deleteLimit)} tooltip={`Deletes up to ${deleteLimit} sub-topics with a single click`}> <CustomIconButton onClick={() => this.deleteTopic(this.props.node, true, deleteLimit)} tooltip={`Deletes up to ${deleteLimit} sub-topics with a single click`}>
<Delete color="action" /> <Delete style={{ marginTop: '-3px' }} color="action" />
</CustomIconButton> </CustomIconButton>
</Badge> </Badge>
) )
@@ -196,6 +195,10 @@ const styles: StyleRulesCallback<string> = (theme: Theme) => {
display: 'block', display: 'block',
height: '100%', height: '100%',
}, },
badge: {
top: '3px',
right: '3px',
},
valuePaper: { valuePaper: {
margin: theme.spacing(1), margin: theme.spacing(1),
}, },

View File

@@ -12,6 +12,8 @@ const styles = (theme: Theme) => ({
button: { button: {
padding: '6px', padding: '6px',
fontSize: '1.2em', fontSize: '1.2em',
width: '32px',
height: '32px',
}, },
}) })