fix(SW-719): add title colors

This commit is contained in:
Fredrik Thorsson
2024-11-08 10:43:13 +01:00
parent 9ef2705f67
commit 30e31413fe
6 changed files with 66 additions and 25 deletions

View File

@@ -1,16 +0,0 @@
import { CardProps } from "@/components/TempDesignSystem/Card/card"
import { headingVariants } from "../components/TempDesignSystem/Text/Title/variants"
import type { VariantProps } from "class-variance-authority"
export function getFontColor(theme: CardProps["theme"]) {
let color: VariantProps<typeof headingVariants>["color"]
switch (theme) {
case "primaryDark":
return (color = "pale")
default:
return (color = "burgundy")
}
}

View File

@@ -0,0 +1,30 @@
import { CardProps } from "@/components/TempDesignSystem/Card/card"
import { headingVariants } from "../components/TempDesignSystem/Text/Title/variants"
import type { VariantProps } from "class-variance-authority"
export function getFontColor(theme: CardProps["theme"]) {
let color: VariantProps<typeof headingVariants>["color"]
switch (theme) {
case "one":
return (color = "primaryLight")
case "two":
return (color = "secondaryLight")
case "three":
return (color = "tertiaryLight")
case "primaryDark":
return (color = "primaryDark")
case "primaryDim":
return (color = "primaryDim")
case "primaryInverted":
return (color = "primaryLight")
case "primaryStrong":
return (color = "primaryStrong")
case "image":
return (color = "image")
default:
return (color = "burgundy")
}
}