This commit is contained in:
Aarni Halinen
2021-01-15 22:10:39 +02:00
parent 6dc5e669b9
commit 0638167ca4
101 changed files with 953 additions and 887 deletions
+4 -4
View File
@@ -4,11 +4,11 @@ const breakpointsNumber: Record<Keys, number> = {
mobile: 800,
medium: 1200,
large: 1920,
xlarge: 2560
}
xlarge: 2560,
};
const breakpoints = Object.fromEntries(
Object.entries(breakpointsNumber).map(([k, v]) => [k, `${v}px`])
Object.entries(breakpointsNumber).map(([k, v]) => [k, `${v}px`]),
);
export default breakpoints as Record<Keys, string>;
export default breakpoints as Record<Keys, string>;
+8 -8
View File
@@ -28,7 +28,7 @@ export const ColorMapper = new Map<Colors, string>([
["green1", "#c0dcd9"],
["sand", "#fdf9d7"],
["transparent", "transparent"],
["inherit", "inherit"]
["inherit", "inherit"],
]);
export const colors = {
@@ -45,14 +45,14 @@ export const colors = {
green1: "#c0dcd9",
sand: "#fdf9d7",
transparent: "transparent",
inherit: "inherit"
}
inherit: "inherit",
};
export type Colors2 = keyof typeof colors;
export const colorToClass = (color: Colors): string => color ? `color-div__${color}` : undefined;
export const bgColorToClass = (color: Colors): string => color ? `color-div__background_${color}` : undefined;
export const hoverColorToClass = (color: Colors): string => color ? `color-div__${color}Hoverable` : undefined;
export const bgHoverColorToClass = (color: Colors): string => color ? `color-div__background_${color}Hoverable` : undefined;
export const colorToClass = (color: Colors): string => (color ? `color-div__${color}` : undefined);
export const bgColorToClass = (color: Colors): string => (color ? `color-div__background_${color}` : undefined);
export const hoverColorToClass = (color: Colors): string => (color ? `color-div__${color}Hoverable` : undefined);
export const bgHoverColorToClass = (color: Colors): string => (color ? `color-div__background_${color}Hoverable` : undefined);
export default colors;
export default colors;