Skip to content
Snippets Groups Projects
Commit 5ee79c38 authored by Bogdan Cochior's avatar Bogdan Cochior
Browse files

refactor(theme): change app bar and main container

parent eecba307
No related branches found
No related tags found
No related merge requests found
...@@ -17,9 +17,11 @@ const AppBar = ({ ...@@ -17,9 +17,11 @@ const AppBar = ({
theme, theme,
}) => ( }) => (
<Root> <Root>
{React.cloneElement(brand, { <Brand>
onClick: goTo('/'), {React.cloneElement(brand, {
})} onClick: goTo('/'),
})}
</Brand>
{user && ( {user && (
<User> <User>
<div onClick={toggleMenu}> <div onClick={toggleMenu}>
...@@ -53,16 +55,26 @@ const Root = styled.div` ...@@ -53,16 +55,26 @@ const Root = styled.div`
font-family: ${props => props.theme.fontInterface}; font-family: ${props => props.theme.fontInterface};
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
height: 40px; height: 60px;
flex-grow: 1;
position: fixed;
width: 100%;
z-index: 10;
background-color: #ffffff;
`
const Brand = styled.div`
padding: 10px 20px; padding: 10px 20px;
cursor: pointer;
` `
const User = styled.div` const User = styled.div`
align-items: center; align-items: center;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
height: 40px; height: 60px;
position: relative; position: relative;
padding: 10px 20px;
> div:first-child { > div:first-child {
align-items: center; align-items: center;
...@@ -84,8 +96,8 @@ const Dropdown = styled.div` ...@@ -84,8 +96,8 @@ const Dropdown = styled.div`
`${theme.borderWidth} ${theme.borderStyle} ${theme.colorFurniture}`}; `${theme.borderWidth} ${theme.borderStyle} ${theme.colorFurniture}`};
position: absolute; position: absolute;
min-width: 150px; min-width: 150px;
right: 0; right: 20px;
top: 50px; top: 70px;
z-index: 10; z-index: 10;
` `
......
import React from 'react' import React from 'react'
import 'xpub-bootstrap'
import { compose } from 'recompose' import { compose } from 'recompose'
import { connect } from 'react-redux' import { connect } from 'react-redux'
import styled from 'styled-components' import styled from 'styled-components'
...@@ -18,15 +17,6 @@ const App = ({ children, currentUser, journal, logoutUser }) => ( ...@@ -18,15 +17,6 @@ const App = ({ children, currentUser, journal, logoutUser }) => (
</Root> </Root>
) )
const Root = styled.div`
font-family: 'Fira Sans', sans-serif;
`
const MainContainer = styled.div`
padding: 8px;
margin-top: 20px;
`
export default compose( export default compose(
connect( connect(
state => ({ state => ({
...@@ -36,3 +26,13 @@ export default compose( ...@@ -36,3 +26,13 @@ export default compose(
), ),
withJournal, withJournal,
)(App) )(App)
const Root = styled.div`
font-family: ${props => props.theme.fontInterface};
`
const MainContainer = styled.div`
padding: 90px 10px 40px;
min-height: calc(100vh - 130px);
background-color: ${props => props.theme.backgroundColor || '#fff'};
`
...@@ -2,7 +2,7 @@ const theme = { ...@@ -2,7 +2,7 @@ const theme = {
colorPrimary: '#667080', // Indicates a primary call to action colorPrimary: '#667080', // Indicates a primary call to action
colorSecondary: '#d8d8d8', // Default color for non-primary actions colorSecondary: '#d8d8d8', // Default color for non-primary actions
colorFurniture: '#cccccc', // Meant to be applied to elements that indicate content division colorFurniture: '#cccccc', // Meant to be applied to elements that indicate content division
colorBorder: '#aaaaaa', // For borders around form elements colorBorder: '#667080', // For borders around form elements
colorBackgroundHue: '#f1f1f1', // Used to create a discrete contrast the default background color colorBackgroundHue: '#f1f1f1', // Used to create a discrete contrast the default background color
colorSuccess: '#005500', // Used to indicate a successful validation state colorSuccess: '#005500', // Used to indicate a successful validation state
colorError: '#b50000', // Used to indicate an error in validation colorError: '#b50000', // Used to indicate an error in validation
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment