zepio/app/theme.js

87 lines
1.9 KiB
JavaScript
Raw Normal View History

2018-11-28 14:02:42 -08:00
// @flow
import React, { Fragment } from 'react';
import theme from 'styled-theming';
2018-11-28 18:45:37 -08:00
import { ThemeProvider, createGlobalStyle } from 'styled-components';
// $FlowFixMe
import { normalize } from 'polished'; // eslint-disable-line
2018-11-28 14:02:42 -08:00
import { DARK } from './constants/themes';
2018-12-05 10:12:50 -08:00
const darkOne = '#7B00DD';
2018-12-04 20:26:03 -08:00
const lightOne = '#ffffff';
2018-12-11 15:41:08 -08:00
const brandOne = '#000';
const brandTwo = '#3B3B3F';
2018-12-10 09:05:06 -08:00
const activeItem = '#F5CB00';
2018-12-10 12:50:31 -08:00
const text = '#FFF';
const cardBackgroundColor = '#000';
2018-12-11 15:41:08 -08:00
const sidebarLogoGradientBegin = '#F4B728';
const sidebarLogoGradientEnd = '#FFE240';
2018-12-12 11:48:08 -08:00
const sidebarHoveredItem = '#1C1C1C';
const sidebarHoveredItemLabel = '#969696';
2018-12-11 16:34:38 -08:00
const background = '#212124';
2018-12-12 13:11:28 -08:00
const transactionSent = '#FF6C6C';
const transactionReceived = '#6AEAC0';
2018-12-04 20:26:03 -08:00
2018-11-28 17:54:08 -08:00
const appTheme = {
2018-11-28 14:02:42 -08:00
mode: DARK,
2018-12-04 20:26:03 -08:00
fontFamily: 'PT Sans',
2018-12-12 11:01:30 -08:00
fontWeight: {
bold: 700,
default: 400,
},
fontSize: {
title: 1.25,
2018-12-12 13:11:28 -08:00
text: 0.84375,
2018-12-12 11:01:30 -08:00
zecValueBase: 1.125,
},
2018-11-28 14:02:42 -08:00
colors: {
primary: theme('mode', {
2018-12-04 20:26:03 -08:00
light: lightOne,
dark: darkOne,
}),
2018-12-05 10:12:50 -08:00
secondary: theme('mode', {
light: darkOne,
dark: lightOne,
}),
2018-12-04 20:26:03 -08:00
sidebarBg: brandOne,
sidebarItem: brandTwo,
2018-12-11 15:41:08 -08:00
sidebarItemActive: activeItem,
2018-12-12 11:48:08 -08:00
sidebarHoveredItem,
sidebarHoveredItemLabel,
2018-12-10 12:50:31 -08:00
cardBackgroundColor,
text,
2018-12-10 09:05:06 -08:00
activeItem,
2018-12-12 11:01:30 -08:00
inactiveItem: brandTwo,
2018-12-11 15:41:08 -08:00
sidebarLogoGradientBegin,
sidebarLogoGradientEnd,
2018-12-11 16:34:38 -08:00
background,
2018-12-12 13:11:28 -08:00
transactionSent,
transactionReceived,
2018-11-28 14:02:42 -08:00
},
2018-12-12 11:01:30 -08:00
sidebarWidth: '200px',
headerHeight: '60px',
2018-12-12 11:16:42 -08:00
layoutPaddingLeft: '50px',
2018-12-12 11:01:30 -08:00
layoutPaddingRight: '45px',
2018-11-28 14:02:42 -08:00
};
2018-11-28 17:54:08 -08:00
export const GlobalStyle = createGlobalStyle`
${normalize()}
* {
box-sizing: border-box;
}
`;
2018-11-28 17:54:08 -08:00
/* eslint-disable react/prop-types */
// $FlowFixMe
export const DoczWrapper = ({ children }) => (
<ThemeProvider theme={appTheme}>
<Fragment>
<GlobalStyle />
{children()}
</Fragment>
</ThemeProvider>
);
2018-11-28 18:45:37 -08:00
export default appTheme;