fix(SW-719): use utils inside components folder
This commit is contained in:
@@ -1,76 +0,0 @@
|
||||
import { biroScriptVariants } from "@/components/TempDesignSystem/Text/BiroScript/variants"
|
||||
import { bodyVariants } from "@/components/TempDesignSystem/Text/Body/variants"
|
||||
import { headingVariants } from "@/components/TempDesignSystem/Text/Title/variants"
|
||||
|
||||
import type { VariantProps } from "class-variance-authority"
|
||||
|
||||
import type { CardProps } from "@/components/TempDesignSystem/Card/card"
|
||||
|
||||
export function getTitleFontColor(
|
||||
theme: CardProps["theme"]
|
||||
): VariantProps<typeof headingVariants>["color"] {
|
||||
switch (theme) {
|
||||
case "one":
|
||||
return "primaryLight"
|
||||
case "two":
|
||||
return "secondaryLight"
|
||||
case "three":
|
||||
return "tertiaryLight"
|
||||
case "primaryDark":
|
||||
return "primaryDark"
|
||||
case "primaryDim":
|
||||
return "primaryDim"
|
||||
case "primaryInverted":
|
||||
return "primaryLight"
|
||||
case "primaryStrong":
|
||||
return "primaryStrong"
|
||||
case "image":
|
||||
return "baseText"
|
||||
}
|
||||
}
|
||||
|
||||
export function getScriptFontColor(
|
||||
theme: CardProps["theme"]
|
||||
): VariantProps<typeof biroScriptVariants>["color"] {
|
||||
switch (theme) {
|
||||
case "one":
|
||||
return "primaryLightOnSurfaceAccent"
|
||||
case "two":
|
||||
return "secondaryLightAccent"
|
||||
case "three":
|
||||
return "tertiaryLightAccent"
|
||||
case "primaryDark":
|
||||
return "pink"
|
||||
case "primaryDim":
|
||||
return "primaryDimAccent"
|
||||
case "primaryInverted":
|
||||
return "primaryLightOnSurfaceAccent"
|
||||
case "primaryStrong":
|
||||
return "primaryStrongAccent"
|
||||
case "image":
|
||||
return "baseText"
|
||||
}
|
||||
}
|
||||
|
||||
export function getBodyFontColor(
|
||||
theme: CardProps["theme"]
|
||||
): VariantProps<typeof bodyVariants>["color"] {
|
||||
switch (theme) {
|
||||
case "one":
|
||||
return "primaryLight"
|
||||
case "two":
|
||||
return "secondaryLight"
|
||||
case "three":
|
||||
return "tertiaryLight"
|
||||
case "primaryDark":
|
||||
return "primaryDark"
|
||||
case "primaryDim":
|
||||
return "primaryDim"
|
||||
case "primaryInverted":
|
||||
return "primaryLight"
|
||||
case "primaryStrong":
|
||||
return "primaryStrong"
|
||||
case "image":
|
||||
return "baseText"
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
import type { ButtonProps } from "@/components/TempDesignSystem/Button/button"
|
||||
import type { CardProps } from "@/components/TempDesignSystem/Card/card"
|
||||
|
||||
export function getTheme(theme: CardProps["theme"]): ButtonProps["theme"] {
|
||||
switch (theme) {
|
||||
case "two":
|
||||
return "secondaryLight"
|
||||
case "three":
|
||||
return "tertiaryLight"
|
||||
case "primaryDark":
|
||||
return "primaryDark"
|
||||
case "primaryStrong":
|
||||
case "image":
|
||||
return "primaryStrong"
|
||||
case "one":
|
||||
case "primaryDim":
|
||||
case "primaryInverted":
|
||||
default:
|
||||
return "primaryLight"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user