diff --git a/src/components/BugBountyCards.tsx b/src/components/BugBountyCards.tsx
index 011668ddb15..fb017ea3611 100644
--- a/src/components/BugBountyCards.tsx
+++ b/src/components/BugBountyCards.tsx
@@ -1,105 +1,67 @@
+import { BaseHTMLAttributes } from "react"
import { useTranslation } from "next-i18next"
-import {
- Box,
- type BoxProps,
- Center,
- type CenterProps,
- Divider,
- Flex,
- type FlexProps,
- Heading,
- type HeadingProps,
- type TextProps,
- useToken,
-} from "@chakra-ui/react"
import type { ChildOnlyProp, TranslationKey } from "@/lib/types"
-import { ButtonLink, type ButtonLinkProps } from "@/components/Buttons"
-import Text from "@/components/OldText"
+import { cn } from "@/lib/utils/cn"
+
+import { ButtonLink, ButtonLinkProps } from "./ui/buttons/Button"
+import { Center, Flex, Stack } from "./ui/flex"
+
+type FlexProps = BaseHTMLAttributes
const CardRow = ({ children }: ChildOnlyProp) => (
-
- {children}
-
+ {children}
)
const SubmitBugBountyButton = ({ children, ...props }: ButtonLinkProps) => (
-
+
{children}
)
const Card = ({ children, ...props }: FlexProps) => {
- const tableBoxShadow = useToken("colors", "tableBoxShadow")
-
return (
-
{children}
-
+
)
}
type LabelVariant = "low" | "medium" | "high" | "critical"
-type LabelProps = CenterProps & {
+type LabelProps = FlexProps & {
variant: LabelVariant
}
-const stylePropsByVariant = {
- low: {
- bg: "lowBug",
- color: "black300",
- },
- medium: {
- bg: "mediumBug",
- color: "black300",
- },
- high: {
- bg: "fail400",
- color: "white",
- },
- critical: {
- bg: "fail600",
- color: "white",
- },
+const classNameByVariant = {
+ low: "bg-red-100 text-black",
+ medium: "bg-red-300 text-black",
+ high: "bg-red-700 text-white",
+ critical: "bg-red-900 text-white",
}
const Label = ({ children, variant = "medium", ...props }: LabelProps) => {
- const variantStyleProps = stylePropsByVariant[variant]
+ const variantClassName = classNameByVariant[variant]
return (
{children}
@@ -107,48 +69,34 @@ const Label = ({ children, variant = "medium", ...props }: LabelProps) => {
)
}
-const H2 = ({ children, ...props }: HeadingProps) => (
- (
+
{children}
-
+
)
-const Description = ({ children, ...props }: TextProps) => (
-
+const Description = ({ children, ...props }) => (
+
{children}
-
+
)
-const SubHeader = ({ children, ...props }: TextProps) => (
-
+const SubHeader = ({ children, ...props }) => (
+
{children}
-
+
)
-const TextBox = ({ children, ...props }: BoxProps) => (
-
+const TextBox = ({
+ children,
+ ...props
+}: BaseHTMLAttributes) => (
+
{children}
-
+
)
export interface BugBountyCardInfo {
@@ -246,7 +194,7 @@ const BugBountyCards = () => {
{t(card.h2TranslationId)}
{t(card.descriptionTranslationId)}
{t(card.subDescriptionTranslationId)}
-
+
{t(card.subHeader1TranslationId)}
@@ -258,7 +206,7 @@ const BugBountyCards = () => {
))}
-
+
{t(card.subHeader2TranslationId)}
{t(card.textTranslationId)}