From 80bb8a108f29331cdb2f2695f6801beee104dc89 Mon Sep 17 00:00:00 2001
From: MohamedBassem <me@mbassem.com>
Date: Thu, 8 Feb 2024 15:14:23 +0000
Subject: [refactor] Move the different packages to the package subdir

---
 packages/web/components/ui/imageCard.tsx | 56 ++++++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)
 create mode 100644 packages/web/components/ui/imageCard.tsx

(limited to 'packages/web/components/ui/imageCard.tsx')

diff --git a/packages/web/components/ui/imageCard.tsx b/packages/web/components/ui/imageCard.tsx
new file mode 100644
index 00000000..1394ae08
--- /dev/null
+++ b/packages/web/components/ui/imageCard.tsx
@@ -0,0 +1,56 @@
+import * as React from "react";
+
+import { cn } from "@/lib/utils";
+
+export function ImageCard({
+  children,
+  image,
+  className,
+  ...props
+}: React.HTMLAttributes<HTMLDivElement> & { image?: string }) {
+  return (
+    <div
+      className={cn("h-96 rounded-lg overflow-hidden shadow-md", className)}
+      {...props}
+    >
+      <div
+        className="h-3/5 bg-cover bg-center"
+        style={{
+          backgroundImage: image ? `url(${image})` : undefined,
+        }}
+      ></div>
+      <div className="flex flex-col h-2/5 p-2">{children}</div>
+    </div>
+  );
+}
+
+export function ImageCardTitle({
+  className,
+  ...props
+}: React.HTMLAttributes<HTMLDivElement>) {
+  return (
+    <div
+      className={cn("order-first flex-none font-bold text-lg", className)}
+      {...props}
+    />
+  );
+}
+
+export function ImageCardBody({
+  className,
+  ...props
+}: React.HTMLAttributes<HTMLDivElement>) {
+  return (
+    <div
+      className={cn("grow order-1 font-bold text-lg", className)}
+      {...props}
+    />
+  );
+}
+
+export function ImageCardFooter({
+  className,
+  ...props
+}: React.HTMLAttributes<HTMLDivElement>) {
+  return <div className={cn("order-last", className)} {...props} />;
+}
-- 
cgit v1.2.3-70-g09d2

