2019-09-05 17:47:50 +00:00
|
|
|
import * as styledComponents from "styled-components";
|
2019-09-22 20:25:05 +00:00
|
|
|
import { Colors, Color } from "./Colors";
|
2019-09-05 17:47:50 +00:00
|
|
|
import * as FontFamilies from "./Fonts";
|
|
|
|
|
|
|
|
|
|
export type FontFamily = (typeof FontFamilies)[keyof typeof FontFamilies];
|
2019-02-10 15:06:57 +00:00
|
|
|
|
|
|
|
|
const {
|
|
|
|
|
default: styled,
|
|
|
|
|
css,
|
|
|
|
|
keyframes,
|
|
|
|
|
createGlobalStyle,
|
2019-09-05 17:47:50 +00:00
|
|
|
ThemeProvider,
|
|
|
|
|
} = styledComponents as styledComponents.ThemedStyledComponentsModule<Theme>;
|
2019-02-10 15:06:57 +00:00
|
|
|
|
2019-09-05 17:47:50 +00:00
|
|
|
export type Theme = {
|
|
|
|
|
radii: Array<number>;
|
|
|
|
|
fontSizes: Array<number>;
|
|
|
|
|
spaces: Array<number>;
|
|
|
|
|
fontWeights: Array<number>;
|
|
|
|
|
colors: Record<string, Color>;
|
|
|
|
|
lineHeights: Array<number>;
|
|
|
|
|
fonts: Array<FontFamily>;
|
2019-09-22 20:25:05 +00:00
|
|
|
borders: { thickness: string; style: "dashed" | "solid"; color: Color }[];
|
2019-09-05 17:47:50 +00:00
|
|
|
};
|
2019-02-10 15:06:57 +00:00
|
|
|
|
2019-09-05 17:47:50 +00:00
|
|
|
export const theme: Theme = {
|
2019-09-06 09:30:22 +00:00
|
|
|
radii: [0, 4, 8, 10, 20],
|
|
|
|
|
fontSizes: [0, 10, 12, 14, 16, 18, 24, 28, 32, 48, 64],
|
2019-09-05 17:47:50 +00:00
|
|
|
spaces: [0, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24],
|
|
|
|
|
fontWeights: [0, 400, 500, 700],
|
|
|
|
|
colors: {
|
|
|
|
|
primary: Colors.GREEN,
|
|
|
|
|
error: Colors.RED,
|
2019-09-06 11:40:00 +00:00
|
|
|
hover: Colors.POLAR,
|
|
|
|
|
textDefault: Colors.BLACK_PEARL,
|
2019-09-06 09:30:22 +00:00
|
|
|
textOnDarkBG: Colors.WHITE,
|
2019-09-06 11:40:00 +00:00
|
|
|
textAnchor: Colors.PURPLE,
|
|
|
|
|
border: Colors.GEYSER,
|
|
|
|
|
paneCard: Colors.SHARK,
|
|
|
|
|
paneBG: Colors.OUTER_SPACE,
|
2019-10-01 20:07:43 +00:00
|
|
|
grid: Colors.GEYSER,
|
|
|
|
|
containerBorder: Colors.FRENCH_PASS,
|
2019-09-05 17:47:50 +00:00
|
|
|
},
|
|
|
|
|
lineHeights: [0, 14, 18, 22, 24, 28, 36, 48, 64, 80],
|
2019-09-06 09:30:22 +00:00
|
|
|
fonts: [FontFamilies.DMSans, FontFamilies.AppsmithWidget],
|
2019-09-22 20:25:05 +00:00
|
|
|
borders: [
|
|
|
|
|
{
|
2019-10-01 20:07:43 +00:00
|
|
|
thickness: "1px",
|
|
|
|
|
style: "solid",
|
|
|
|
|
color: Colors.FRENCH_PASS,
|
2019-09-22 20:25:05 +00:00
|
|
|
},
|
|
|
|
|
],
|
2019-09-05 17:47:50 +00:00
|
|
|
};
|
2019-02-10 15:06:57 +00:00
|
|
|
|
2019-09-05 17:47:50 +00:00
|
|
|
export { css, createGlobalStyle, keyframes, ThemeProvider };
|
|
|
|
|
export default styled;
|