Browse Source

Merge pull request #104 from meriadec/master

Work on dashboard
master
Loëck Vézien 7 years ago
committed by GitHub
parent
commit
474ce00f96
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      src/components/DashboardPage/index.js
  2. 2
      src/components/GlobalSearch.js
  3. 2
      src/components/TopBar.js
  4. 2
      src/components/Wrapper.js
  5. 8
      src/components/base/Pills/index.js
  6. 3
      src/components/base/Text.js
  7. 2
      src/styles/theme.js

8
src/components/DashboardPage.js → src/components/DashboardPage/index.js

@ -116,13 +116,13 @@ class DashboardPage extends PureComponent<Props, State> {
const totalAccounts = accounts.length const totalAccounts = accounts.length
return ( return (
<Box flow={4}> <Box flow={7}>
<Box horizontal align="flex-end"> <Box horizontal align="flex-end">
<Box> <Box>
<Text color="black" fontSize={6}> <Text color="dark" ff="Museo Sans|Regular" fontSize={7}>
{'Hello Anonymous,'} {'Good morning, Khalil.'}
</Text> </Text>
<Text color="grey" fontSize={3}> <Text color="grey" fontSize={5} ff="Museo Sans|Light">
{totalAccounts > 0 {totalAccounts > 0
? `here is the summary of your ${totalAccounts} accounts` ? `here is the summary of your ${totalAccounts} accounts`
: 'no accounts'} : 'no accounts'}

2
src/components/GlobalSearch.js

@ -28,7 +28,7 @@ class GlobalSearch extends PureComponent<{}> {
render() { render() {
return ( return (
<Box grow horizontal> <Box grow horizontal ff="Open Sans|SemiBold" fontSize={4}>
<Box justify="center" onClick={this.focusInput} pr={2}> <Box justify="center" onClick={this.focusInput} pr={2}>
<Icon name="search" /> <Icon name="search" />
</Box> </Box>

2
src/components/TopBar.js

@ -140,7 +140,7 @@ class TopBar extends PureComponent<Props, State> {
</Box> </Box>
</Box> </Box>
<Box horizontal noShrink> <Box horizontal noShrink>
<Box justify="center" px={4}> <Box justify="center" px={4} ff="Open Sans|SemiBold" fontSize={4}>
{'Khalil Benihoud'} {'Khalil Benihoud'}
</Box> </Box>
</Box> </Box>

2
src/components/Wrapper.js

@ -50,7 +50,7 @@ class Wrapper extends Component<{}> {
<Box shrink grow bg="cream" color="grey" relative> <Box shrink grow bg="cream" color="grey" relative>
<TopBar /> <TopBar />
<UpdateNotifier /> <UpdateNotifier />
<GrowScroll p={5} style={{ paddingTop: 80 }}> <GrowScroll p={5} style={{ paddingTop: 100 }}>
<Route path="/" exact component={DashboardPage} /> <Route path="/" exact component={DashboardPage} />
<Route path="/settings" component={SettingsPage} /> <Route path="/settings" component={SettingsPage} />
<Route path="/account/:id" component={AccountPage} /> <Route path="/account/:id" component={AccountPage} />

8
src/components/base/Pills/index.js

@ -23,27 +23,29 @@ const Container = styled(Box).attrs({
})`` })``
const Pill = styled(Tabbable).attrs({ const Pill = styled(Tabbable).attrs({
ff: p => (p.isActive ? 'Open Sans|SemiBold' : 'Open Sans'),
color: p => (p.isActive ? 'dodgerBlue' : 'warmGrey'), color: p => (p.isActive ? 'dodgerBlue' : 'warmGrey'),
bg: p => (p.isActive ? rgba(p.theme.colors.dodgerBlue, 0.1) : ''), bg: p => (p.isActive ? rgba(p.theme.colors.dodgerBlue, 0.1) : ''),
px: 2, px: 2,
fontSize: 0, fontSize: 4,
align: 'center', align: 'center',
justify: 'center', justify: 'center',
})` })`
height: 30px; height: 30px;
border-radius: 4px; border-radius: 4px;
outline: none; outline: none;
cursor: pointer; cursor: ${p => (p.isActive ? 'default' : 'pointer')};
&:focus { &:focus {
color: ${p => p.theme.colors.dodgerBlue}; color: ${p => p.theme.colors.dodgerBlue};
background-color: ${p => (p.isActive ? '' : rgba(p.theme.colors.black, 0.02))};
} }
` `
function Pills(props: Props) { function Pills(props: Props) {
const { items, activeKey, onChange, ...p } = props const { items, activeKey, onChange, ...p } = props
return ( return (
<Container {...p}> <Container flow={1} {...p}>
{items.map(item => { {items.map(item => {
const isActive = item.key === activeKey const isActive = item.key === activeKey
return ( return (

3
src/components/base/Text.js

@ -3,7 +3,10 @@
import styled from 'styled-components' import styled from 'styled-components'
import { fontSize, fontWeight, textAlign, color } from 'styled-system' import { fontSize, fontWeight, textAlign, color } from 'styled-system'
import fontFamily from 'styles/styled/fontFamily'
export default styled.span` export default styled.span`
${fontFamily};
${fontSize}; ${fontSize};
${textAlign}; ${textAlign};
${color}; ${color};

2
src/styles/theme.js

@ -1,7 +1,7 @@
// @flow // @flow
export const space = [0, 5, 10, 15, 20, 30, 40, 50, 70] export const space = [0, 5, 10, 15, 20, 30, 40, 50, 70]
export const fontSizes = [8, 9, 10, 11, 13, 16, 18, 32] export const fontSizes = [8, 9, 10, 11, 13, 16, 18, 22, 32]
export const radii = [0, 4] export const radii = [0, 4]
export const fontFamilies = { export const fontFamilies = {

Loading…
Cancel
Save