From 80660b4fbce35d81bcb51ae8fc5c638f6274f4f8 Mon Sep 17 00:00:00 2001
From: Kevin Ly <44701340+kevinly77@users.noreply.github.com>
Date: Thu, 8 Aug 2024 17:33:46 -0400
Subject: [PATCH] Add: order card
---
packages/_site/src/pages/examples/index.tsx | 12 +-
.../_site/src/pages/examples/order_card.tsx | 237 ++++++++++++++++++
2 files changed, 247 insertions(+), 2 deletions(-)
create mode 100644 packages/_site/src/pages/examples/order_card.tsx
diff --git a/packages/_site/src/pages/examples/index.tsx b/packages/_site/src/pages/examples/index.tsx
index 006e5df..7da7cb1 100644
--- a/packages/_site/src/pages/examples/index.tsx
+++ b/packages/_site/src/pages/examples/index.tsx
@@ -7,6 +7,7 @@ import { Auth02 } from "./auth_02";
import { Auth } from "./auth";
import { Playground } from "./playground";
import CookiesSettings from "./cookies_settings";
+import OrderCard from "./order_card";
const styles = stylex.create({
base: {
@@ -20,8 +21,8 @@ const styles = stylex.create({
marginTop: "1rem",
border: "0.0625rem solid var(--border-color)",
borderRadius: "0.25rem",
- overflow: "hidden",
- minHeight: "800px",
+ overflow: "auto",
+ minHeight: "1200px",
position: "relative",
},
});
@@ -74,6 +75,13 @@ export default function Examples() {
+
+
Order Card(WIP)
+
+
+
+
+
);
}
diff --git a/packages/_site/src/pages/examples/order_card.tsx b/packages/_site/src/pages/examples/order_card.tsx
new file mode 100644
index 0000000..7481095
--- /dev/null
+++ b/packages/_site/src/pages/examples/order_card.tsx
@@ -0,0 +1,237 @@
+import { Button, ButtonVariants } from "@controlkit/button";
+import {
+ Card,
+ CardContent,
+ CardDescription,
+ CardFooter,
+ CardHeader,
+ CardTitle,
+} from "@controlkit/card";
+import { Divider } from "@controlkit/divider";
+import {
+ DropdownMenu,
+ DropdownMenuContent,
+ DropdownMenuItem,
+ DropdownMenuSeparator,
+ DropdownMenuTrigger,
+} from "@controlkit/dropdown-menu";
+import { H6 } from "@controlkit/headings";
+import { Switch } from "@controlkit/switch";
+import stylex from "@stylexjs/stylex";
+import { useState } from "react";
+
+const styles = stylex.create({
+ base: {
+ display: "grid",
+ height: "100%",
+ width: "100%",
+ position: "absolute",
+ alignContent: "center",
+ justifyContent: "center",
+ },
+
+ card: {
+ width: "28rem",
+ borderRadius: "0.25rem",
+ },
+
+ cardHeader: {
+ display: "flex",
+ gap: "0.25rem",
+ padding: "1rem",
+ flexDirection: "row",
+ alignItems: "center",
+ justifyContent: "space-between",
+ },
+
+ cardHeaderLeft: {
+ display: "flex",
+ flexDirection: "column",
+ gap: "0.25rem",
+ },
+
+ cardHeaderRight: {
+ display: "flex",
+ gap: "0.5rem",
+ },
+
+ cardFooter: {
+ display: "flex",
+ gap: "0.25rem",
+ padding: "1rem",
+ alignItems: "center",
+ },
+ spaceApart: {
+ display: "flex",
+ alignItems: "center",
+ justifyContent: "space-between",
+ },
+
+ flexColumn: {
+ display: "flex",
+ flexDirection: "column",
+ //gap: "0.5rem",
+ },
+
+ cardContent: {
+ display: "flex",
+ flexDirection: "column",
+ gap: "0.5rem",
+ padding: "1rem",
+ },
+
+ shippingSection: {
+ /* display: "flex",
+ //justifyContent: "space-between",
+ alignItems: "center", */
+ display: "grid",
+ gridTemplateColumns: "1fr 1fr",
+ },
+
+ button: {
+ display: "flex",
+ justifyContent: "center",
+ alignItems: "center",
+ padding: "0.5rem",
+ height: "fit-content",
+ minWidth: 0,
+ },
+
+ menuContent: {
+ minWidth: "6rem",
+ },
+});
+export default function OrderCard() {
+ return (
+
+
+
+
+ Order 52zr3057
+ Date: August 8, 2024
+
+
+
+
+
+
+
+
+ Edit
+ Export
+
+ Delete
+
+
+
+
+
+
+
+
Order Details
+
+
RTX 4090 x1
+
$3,000.00
+
+
+
AMD Ryzen 7 7800X3D x1
+
$500.00
+
+
+
+
+
+
+
+
+ Total
+
$3,530.00
+
+
+
+
+
+
+
Shipping Information
+ John Doe
+ 1332 Hillcrest Circle.
+ K1R 5N9
+
+
+
Billing Information
+ Same as shipping information
+
+
+
+
+
+
Customer Information
+
+
Customer Name
+
John Doe
+
+
+
Email
+
jonhdoe@me.com
+
+
+
+
Phone
+
1+ (123) 456-7890
+
+
+
+
+
+
+
Payment Information
+
+
+ {" "}
+ Visa
+
+
**** **** **** 3095
+
+
+
+
+ Updated August 8, 2024
+
+
+
+ );
+}