feat(SW-440) implemented changes to buttons according to figma

This commit is contained in:
Erik Tiekstra
2024-09-27 11:34:14 +02:00
parent d2121a3fed
commit ea1a175c41
6 changed files with 50 additions and 55 deletions

View File

@@ -1,53 +1,21 @@
import type { ButtonProps } from "@/components/TempDesignSystem/Button/button"
import type { CardProps } from "@/components/TempDesignSystem/Card/card"
import type { LinkProps } from "@/components/TempDesignSystem/Link/link"
export function getTheme(theme: CardProps["theme"]) {
let buttonTheme: ButtonProps["theme"] = "primaryLight"
let primaryLinkColor: LinkProps["color"] = "pale"
let secondaryLinkColor: LinkProps["color"] = "burgundy"
export function getTheme(theme: CardProps["theme"]): ButtonProps["theme"] {
switch (theme) {
case "one":
buttonTheme = "primaryLight"
primaryLinkColor = "pale"
secondaryLinkColor = "burgundy"
break
case "two":
buttonTheme = "secondaryLight"
primaryLinkColor = "pale"
secondaryLinkColor = "burgundy"
break
return "secondaryLight"
case "three":
buttonTheme = "tertiaryLight"
primaryLinkColor = "pale"
secondaryLinkColor = "burgundy"
break
return "tertiaryLight"
case "primaryDark":
buttonTheme = "primaryDark"
primaryLinkColor = "burgundy"
secondaryLinkColor = "pale"
break
case "primaryDim":
buttonTheme = "primaryLight"
primaryLinkColor = "pale"
secondaryLinkColor = "burgundy"
break
case "primaryInverted":
buttonTheme = "primaryLight"
primaryLinkColor = "pale"
secondaryLinkColor = "burgundy"
break
return "primaryDark"
case "primaryStrong":
case "image":
buttonTheme = "primaryStrong"
primaryLinkColor = "red"
secondaryLinkColor = "white"
}
return {
buttonTheme: buttonTheme,
primaryLinkColor: primaryLinkColor,
secondaryLinkColor: secondaryLinkColor,
return "primaryStrong"
case "one":
case "primaryDim":
case "primaryInverted":
default:
return "primaryLight"
}
}