Chore/BOOK-708 replace title component * chore(BOOK-708): replace title with typography * chore(BOOK-708): replace title with typography * chore(BOOK-708): remove Title from package.json Approved-by: Linus Flood Approved-by: Anton Gunnarsson
50 lines
1.3 KiB
TypeScript
50 lines
1.3 KiB
TypeScript
import type { ButtonProps } from "@scandic-hotels/design-system/OldDSButton"
|
|
import type { VariantProps } from "class-variance-authority"
|
|
|
|
import type { CardProps } from "@/components/TempDesignSystem/Card/card"
|
|
import type { biroScriptVariants } from "@/components/TempDesignSystem/Text/BiroScript/variants"
|
|
|
|
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 getButtonTheme(
|
|
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"
|
|
}
|
|
}
|