1 import React from "react"
2 import clsx from "clsx"
3 import { Link } from "@/components/Link"
4 import { TriangleRightMini } from "@medusajs/icons"
5 import { BloomIcon, CardProps } from "../../.."
6
7 export const CardBloomLayout = ({
8 title,
9 text,
10 href,
11 className,
12 contentClassName,
13 children,
14 onClick,
15 }: CardProps) => {
16 return (
17 <div
18 className={clsx(
19 "w-full rounded-docs_DEFAULT",
20 "py-docs_0.5 px-docs_0.75 relative",
21 "flex justify-start items-center gap-docs_0.75",
22 "bg-bg-bloom-callout",
23 "border-[0.5px] border-medusa-alphas-alpha-10",
24 "hover:border-medusa-tag-orange-border transition-colors",
25 className
26 )}
27 >
28 <div
29 className={clsx(
30 "flex flex-col gap-docs_0.125 flex-1 overflow-auto",
31 contentClassName
32 )}
33 >
34 <div className="flex gap-[6px] items-center">
35 <BloomIcon className="text-medusa-tag-orange-text" />
36 {title && (
37 <div
38 className={clsx(
39 "text-x-small-plus truncate",
40 "bg-bg-bloom-callout-text bg-clip-text text-transparent"
41 )}
42 data-testid="title"
43 >
44 {title}
45 </div>
46 )}
47 </div>
48 {text && (
49 <span
50 className={clsx(
51 "text-small-plus",
52 "bg-bg-bloom-callout-text bg-clip-text text-transparent"
53 )}
54 data-testid="text"
55 >
56 {text}
57 </span>
58 )}
59 {children}
60 </div>
61 <span className="text-medusa-tag-blue-text">
62 <TriangleRightMini data-testid="internal-icon" />
63 </span>
64
65 {href && (
66 <Link
67 href={href}
68 className="absolute left-0 top-0 h-full w-full rounded"
69 prefetch={false}
70 aria-label={title}
71 onClick={onClick}
72 />
73 )}
74 </div>
75 )
76 }