Finished sidebar

This commit is contained in:
2025-08-16 23:39:11 +02:00
parent 1921efc76a
commit c79d06f272
35 changed files with 1307 additions and 9 deletions

36
src/data/colors.ts Normal file
View File

@@ -0,0 +1,36 @@
type ReturnType = `text-mc-${string}` | `bg-mc-${string}`
export function getColor(color?: string, type: "text" | "bg" = "text", defaultColor: "red" | "gray" = "red"): ReturnType {
switch (color) {
case "RED":
return type === "text" ? "text-mc-red" : "bg-mc-red"
case "GOLD":
return type === "text" ? "text-mc-gold" : "bg-mc-gold"
case "LIME":
return type === "text" ? "text-mc-green" : "bg-mc-green"
case "YELLOW":
return type === "text" ? "text-mc-yellow" : "bg-mc-yellow"
case "LIGHT_PURPLE":
return type === "text" ? "text-mc-light-purple" : "bg-mc-light-purple"
case "WHITE":
return type === "text" ? "text-mc-white" : "bg-mc-white"
case "BLUE":
return type === "text" ? "text-mc-blue" : "bg-mc-blue"
case "GREEN":
return type === "text" ? "text-mc-green" : "bg-mc-green"
case "DARK_RED":
return type === "text" ? "text-mc-dark-red" : "bg-mc-dark-red"
case "DARK_GREEN":
return type === "text" ? "text-mc-dark-green" : "bg-mc-dark-green"
case "DARK_PURPLE":
return type === "text" ? "text-mc-dark-purple" : "bg-mc-dark-purple"
case "DARK_GRAY":
return type === "text" ? "text-mc-dark-gray" : "bg-mc-dark-gray"
case "BLACK":
return type === "text" ? "text-mc-black" : "bg-mc-black"
case "DARK_BLUE":
return type === "text" ? "text-mc-dark-blue" : "bg-mc-dark-blue"
default:
return type === "text" ? `text-mc-${defaultColor}` : `bg-mc-${defaultColor}`
}
}