Files
medusa-store/www/packages/docs-ui/src/components/Card/index.tsx
Shahed Nasser af350c3a8b docs: add search to workflows reference (#11054)
* docs: add search to workflows reference

* fix error
2025-01-20 17:02:29 +02:00

41 lines
1.1 KiB
TypeScript

import React from "react"
import { BadgeProps } from "@/components"
import { CardDefaultLayout } from "./Layout/Default"
import { IconProps } from "@medusajs/icons/dist/types"
import { CardLargeLayout } from "./Layout/Large"
import { CardFillerLayout } from "./Layout/Filler"
import { CardLayoutMini } from "./Layout/Mini"
export type CardProps = {
type?: "default" | "large" | "filler" | "mini"
icon?: React.FC<IconProps>
rightIcon?: React.FC<IconProps>
image?: string
themeImage?: {
light: string
dark: string
}
title?: string
text?: string
href?: string
className?: string
contentClassName?: string
iconClassName?: string
children?: React.ReactNode
badge?: BadgeProps
highlightText?: string[]
}
export const Card = ({ type = "default", ...props }: CardProps) => {
switch (type) {
case "large":
return <CardLargeLayout {...props} />
case "filler":
return <CardFillerLayout {...props} />
case "mini":
return <CardLayoutMini {...props} />
default:
return <CardDefaultLayout {...props} />
}
}