Skip to content

Commit

Permalink
Add base colors configuration and types
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfromearth committed May 30, 2022
1 parent 88f8e72 commit 9ea78d3
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 0 deletions.
41 changes: 41 additions & 0 deletions app/styles/commonStyles.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import { IBaseColors } from './types';

export const baseColors: IBaseColors = {
washington: {
base: '#151515',
a: '#575757',
b: '#A9A9A9',
c: '#D1D1D1',
d: '#EBEBEB',
e: '#F5F5F5',
f: '#F9F9F9',
},
podgorica: {
base: '#6A983C',
a: '#46760A',
b: '#92C064',
c: '#C8DEB3',
d: '#F4F8EC',
},
moscow: {
base: '#D0A866',
a: '#B28A48',
b: '#ECD2A6',
c: '#FAEDD8',
d: '#FFF9F0',
},
amsterdam: {
base: '#E6704B',
a: '#C7522D',
b: '#EB8D70',
c: '#F7C6B7',
d: '#FFF1ED',
},
vienna: {
base: '#37D0D6',
a: '#19B2B8',
b: '#7CD0D3',
c: '#B9E6E8',
d: '#ECF6F6',
},
};
2 changes: 2 additions & 0 deletions app/styles/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { baseColors } from './commonStyles';
export type { IColorNames, IBaseColors } from './types';
15 changes: 15 additions & 0 deletions app/styles/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
type IColorNamesWithoutWashington = 'podgorica' | 'moscow' | 'amsterdam' | 'vienna';
export type IColorNames = 'washington' | IColorNamesWithoutWashington;
type IColorShades = 'a' | 'b' | 'c' | 'd';

type IColor<T extends string = IColorShades> = {
[key in T]: string;
} & {
base: string;
};

export type IBaseColors = {
[key in IColorNamesWithoutWashington]: IColor;
} & {
washington: IColor<IColorShades | 'e' | 'f'>;
};

0 comments on commit 9ea78d3

Please sign in to comment.