Refactor style enums to string literals

This commit is contained in:
Aarni Halinen
2020-07-06 16:46:44 +03:00
parent 623a9e5cd2
commit 284864316b
16 changed files with 161 additions and 189 deletions
+21
View File
@@ -0,0 +1,21 @@
export type Colors =
"dark-blue" |
"light-blue" |
"white1" |
"black1" |
"grey1" |
"grey2" |
"orange1" |
"orange2" |
"blue1" |
"light-turquoise" |
"green1" |
"sand" |
"transparent" |
"inherit";
export const colorToClass = (color: Colors): string => `color-div__${color}`;
export const bgColorToClass = (color: Colors): string => `color-div__background_${color}`;
export const hoverColorToClass = (color: Colors): string => `color-div__${color}Hoverable`;
export const bgHoverColorToClass = (color: Colors): string => `color-div__background_${color}Hoverable`;
View File