fix(SW-719): add body color

This commit is contained in:
Fredrik Thorsson
2024-11-08 15:55:05 +01:00
parent effbc4c571
commit 8d06394b0f
11 changed files with 89 additions and 31 deletions
+27
View File
@@ -0,0 +1,27 @@
import { CardProps } from "@/components/TempDesignSystem/Card/card"
import { bodyVariants } from "@/components/TempDesignSystem/Text/Body/variants"
import type { VariantProps } from "class-variance-authority"
export function getBodyFontColor(theme: CardProps["theme"]) {
let color: VariantProps<typeof bodyVariants>["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 = "baseText")
}
}
+6 -7
View File
@@ -1,6 +1,5 @@
import { CardProps } from "@/components/TempDesignSystem/Card/card"
import { biroScriptVariants } from "../components/TempDesignSystem/Text/BiroScript/variants"
import { biroScriptVariants } from "@/components/TempDesignSystem/Text/BiroScript/variants"
import type { VariantProps } from "class-variance-authority"
@@ -11,18 +10,18 @@ export function getScriptFontColor(theme: CardProps["theme"]) {
case "one":
return (color = "primaryLightOnSurfaceAccent")
case "two":
return (color = "secondaryLight")
return (color = "secondaryLightAccent")
case "three":
return (color = "tertiaryLight")
return (color = "tertiaryLightAccent")
case "primaryDark":
return (color = "pink")
case "primaryDim":
return (color = "primaryDim")
return (color = "primaryDimAccent")
case "primaryInverted":
return (color = "primaryLightOnSurfaceAccent")
case "primaryStrong":
return (color = "primaryStrong")
return (color = "primaryStrongAccent")
case "image":
return (color = "image")
return (color = "baseText")
}
}
+3 -4
View File
@@ -1,10 +1,9 @@
import { CardProps } from "@/components/TempDesignSystem/Card/card"
import { headingVariants } from "../components/TempDesignSystem/Text/Title/variants"
import { headingVariants } from "@/components/TempDesignSystem/Text/Title/variants"
import type { VariantProps } from "class-variance-authority"
export function getFontColor(theme: CardProps["theme"]) {
export function getTitleFontColor(theme: CardProps["theme"]) {
let color: VariantProps<typeof headingVariants>["color"]
switch (theme) {
@@ -23,6 +22,6 @@ export function getFontColor(theme: CardProps["theme"]) {
case "primaryStrong":
return (color = "primaryStrong")
case "image":
return (color = "image")
return (color = "baseText")
}
}