From a0bbae7d95ac7b54513da1491761bbd66d0c3f7f Mon Sep 17 00:00:00 2001 From: Camille Villa <cvilla100@gmail.com> Date: Tue, 26 Feb 2019 14:47:25 -0800 Subject: [PATCH] Connect window top bar style to theme --- src/components/WindowTopBar.js | 2 +- src/containers/WindowTopBar.js | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/components/WindowTopBar.js b/src/components/WindowTopBar.js index 1eb134694..a36cd1dcc 100644 --- a/src/components/WindowTopBar.js +++ b/src/components/WindowTopBar.js @@ -27,7 +27,7 @@ export class WindowTopBar extends Component { } = this.props; return ( <AppBar position="relative"> - <Toolbar disableGutters className={classNames(classes.reallyDense, ns('window-top-bar'))} variant="dense"> + <Toolbar disableGutters className={classNames(classes.windowTopBarStyle, ns('window-top-bar'))} variant="dense"> <IconButton aria-label={t('toggleWindowSideBar')} color="inherit" diff --git a/src/containers/WindowTopBar.js b/src/containers/WindowTopBar.js index 26c912aea..871a76678 100644 --- a/src/containers/WindowTopBar.js +++ b/src/containers/WindowTopBar.js @@ -22,17 +22,22 @@ const mapDispatchToProps = (dispatch, { windowId }) => ({ toggleWindowSideBar: () => dispatch(actions.toggleWindowSideBar(windowId)), }); - -const styles = { +/** + * @param theme + * @returns {{typographyBody: {flexGrow: number, fontSize: number|string}, + * windowTopBarStyle: {minHeight: number, paddingLeft: number, backgroundColor: string}}} + */ +const styles = theme => ({ typographyBody: { flexGrow: 1, fontSize: '1em', }, - reallyDense: { + windowTopBarStyle: { minHeight: 32, paddingLeft: 4, + backgroundColor: theme.palette.primary.light, }, -}; +}); const enhance = compose( withNamespaces(), -- GitLab