Refactor style enums to string literals
This commit is contained in:
@@ -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`;
|
||||
Reference in New Issue
Block a user