diff --git a/shop/package-lock.json b/shop/package-lock.json index ced2677..1a83fc8 100644 --- a/shop/package-lock.json +++ b/shop/package-lock.json @@ -32,6 +32,7 @@ "recharts": "^2.10.4", "tailwind-merge": "^2.2.0", "tailwindcss-animate": "^1.0.7", + "vaul": "^0.8.0", "viem": "^1.21.4", "wagmi": "^1.4.13" }, @@ -10008,6 +10009,18 @@ } } }, + "node_modules/vaul": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/vaul/-/vaul-0.8.0.tgz", + "integrity": "sha512-9nUU2jIObJvJZxeQU1oVr/syKo5XqbRoOMoTEt0hHlWify4QZFlqTh6QSN/yxoKzNrMeEQzxbc3XC/vkPLOIqw==", + "dependencies": { + "@radix-ui/react-dialog": "^1.0.4" + }, + "peerDependencies": { + "react": "^16.8 || ^17.0 || ^18.0", + "react-dom": "^16.8 || ^17.0 || ^18.0" + } + }, "node_modules/victory-vendor": { "version": "36.8.1", "resolved": "https://registry.npmjs.org/victory-vendor/-/victory-vendor-36.8.1.tgz", diff --git a/shop/package.json b/shop/package.json index 8d2a795..3b4e9d2 100644 --- a/shop/package.json +++ b/shop/package.json @@ -33,6 +33,7 @@ "recharts": "^2.10.4", "tailwind-merge": "^2.2.0", "tailwindcss-animate": "^1.0.7", + "vaul": "^0.8.0", "viem": "^1.21.4", "wagmi": "^1.4.13" }, diff --git a/shop/src/app/dashboard/components/cash-out-button.tsx b/shop/src/app/dashboard/components/cash-out-button.tsx new file mode 100644 index 0000000..0770c37 --- /dev/null +++ b/shop/src/app/dashboard/components/cash-out-button.tsx @@ -0,0 +1,42 @@ +import { PrimaryButton as Button } from '@/components/ui/button' + +import { + Drawer, + DrawerClose, + DrawerContent, + DrawerDescription, + DrawerFooter, + DrawerHeader, + DrawerTitle, + DrawerTrigger, +} from '@/components/ui/drawer' + +export function CashOutButton() { + return ( + + + + + + + + Withdraw Funds + + + 489.97 GHO + + + + + + + + + + + ) +} diff --git a/shop/src/app/dashboard/components/main-nav.tsx b/shop/src/app/dashboard/components/main-nav.tsx index bdbf43d..459d74f 100644 --- a/shop/src/app/dashboard/components/main-nav.tsx +++ b/shop/src/app/dashboard/components/main-nav.tsx @@ -12,25 +12,25 @@ export function MainNav({ {...props} > Overview Customers Products Settings diff --git a/shop/src/app/dashboard/components/overview.tsx b/shop/src/app/dashboard/components/overview.tsx index 0c19d46..ade89a3 100644 --- a/shop/src/app/dashboard/components/overview.tsx +++ b/shop/src/app/dashboard/components/overview.tsx @@ -75,7 +75,7 @@ export function Overview() { dataKey="total" fill="currentColor" radius={[4, 4, 0, 0]} - className="fill-primary" + className="fill-primary hover:fill-primary-foreground" /> diff --git a/shop/src/app/dashboard/components/recent-sales.tsx b/shop/src/app/dashboard/components/recent-sales.tsx index 5c804aa..d901979 100644 --- a/shop/src/app/dashboard/components/recent-sales.tsx +++ b/shop/src/app/dashboard/components/recent-sales.tsx @@ -1,4 +1,6 @@ import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar' +import { RefundButton } from './refund-button' + export function RecentSales() { return ( @@ -14,7 +16,8 @@ export function RecentSales() { olivia.martin@email.com

-
+$1,999.00
+
+$1,999.00
+
@@ -26,6 +29,7 @@ export function RecentSales() {

jackson.lee@email.com

+$39.00
+
@@ -39,6 +43,7 @@ export function RecentSales() {

+$299.00
+
@@ -50,6 +55,7 @@ export function RecentSales() {

will@email.com

+$99.00
+
@@ -61,6 +67,7 @@ export function RecentSales() {

sofia.davis@email.com

+$39.00
+ ) diff --git a/shop/src/app/dashboard/components/refund-button.tsx b/shop/src/app/dashboard/components/refund-button.tsx new file mode 100644 index 0000000..20f3f6d --- /dev/null +++ b/shop/src/app/dashboard/components/refund-button.tsx @@ -0,0 +1,42 @@ +import { PrimaryButton as Button } from '@/components/ui/button' + +import { + Drawer, + DrawerClose, + DrawerContent, + DrawerDescription, + DrawerFooter, + DrawerHeader, + DrawerTitle, + DrawerTrigger, +} from '@/components/ui/drawer' + +export function RefundButton() { + return ( + + + + + + + + Refund Customer Order + + + Revert On-Chain Transaction + + + + + + + + + + + ) +} diff --git a/shop/src/app/dashboard/components/team-switcher.tsx b/shop/src/app/dashboard/components/team-switcher.tsx index bba6f6b..96219e5 100644 --- a/shop/src/app/dashboard/components/team-switcher.tsx +++ b/shop/src/app/dashboard/components/team-switcher.tsx @@ -48,7 +48,7 @@ const groups = [ label: 'Personal Account', teams: [ { - label: 'Alicia Koch', + label: 'Stani K', value: 'personal', }, ], @@ -57,12 +57,12 @@ const groups = [ label: 'Teams', teams: [ { - label: 'Acme Inc.', - value: 'acme-inc', + label: 'Nice Shoes Inc.', + value: 'nice-shoes-inc', }, { - label: 'Monsters Inc.', - value: 'monsters', + label: 'Cool Poaps Inc.', + value: 'cool-poaps-inc', }, ], }, diff --git a/shop/src/app/dashboard/components/user-nav.tsx b/shop/src/app/dashboard/components/user-nav.tsx index ee198f8..98d7099 100644 --- a/shop/src/app/dashboard/components/user-nav.tsx +++ b/shop/src/app/dashboard/components/user-nav.tsx @@ -18,16 +18,16 @@ export function UserNav() {
-

shadcn

+

stani

- m@example.com + gm@aave.com

diff --git a/shop/src/app/dashboard/page.tsx b/shop/src/app/dashboard/page.tsx index 697768b..caa23d2 100644 --- a/shop/src/app/dashboard/page.tsx +++ b/shop/src/app/dashboard/page.tsx @@ -1,6 +1,5 @@ import { Metadata } from 'next' import Image from 'next/image' - import { PrimaryButton as Button } from '@/components/ui/button' import { Card, @@ -18,6 +17,7 @@ import { RecentSales } from '@/app/dashboard/components/recent-sales' import { Search } from '@/app/dashboard/components/search' import TeamSwitcher from '@/app/dashboard/components/team-switcher' import { UserNav } from '@/app/dashboard/components/user-nav' +import { CashOutButton } from './components/cash-out-button' export const metadata: Metadata = { title: 'Dashboard', @@ -60,8 +60,7 @@ export default function DashboardPage() { Esprit Merchant Dashboard
- {/* */} - +
diff --git a/shop/src/components/ui/drawer.tsx b/shop/src/components/ui/drawer.tsx new file mode 100644 index 0000000..6a0ef53 --- /dev/null +++ b/shop/src/components/ui/drawer.tsx @@ -0,0 +1,118 @@ +"use client" + +import * as React from "react" +import { Drawer as DrawerPrimitive } from "vaul" + +import { cn } from "@/lib/utils" + +const Drawer = ({ + shouldScaleBackground = true, + ...props +}: React.ComponentProps) => ( + +) +Drawer.displayName = "Drawer" + +const DrawerTrigger = DrawerPrimitive.Trigger + +const DrawerPortal = DrawerPrimitive.Portal + +const DrawerClose = DrawerPrimitive.Close + +const DrawerOverlay = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)) +DrawerOverlay.displayName = DrawerPrimitive.Overlay.displayName + +const DrawerContent = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, children, ...props }, ref) => ( + + + +
+ {children} + + +)) +DrawerContent.displayName = "DrawerContent" + +const DrawerHeader = ({ + className, + ...props +}: React.HTMLAttributes) => ( +
+) +DrawerHeader.displayName = "DrawerHeader" + +const DrawerFooter = ({ + className, + ...props +}: React.HTMLAttributes) => ( +
+) +DrawerFooter.displayName = "DrawerFooter" + +const DrawerTitle = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)) +DrawerTitle.displayName = DrawerPrimitive.Title.displayName + +const DrawerDescription = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)) +DrawerDescription.displayName = DrawerPrimitive.Description.displayName + +export { + Drawer, + DrawerPortal, + DrawerOverlay, + DrawerTrigger, + DrawerClose, + DrawerContent, + DrawerHeader, + DrawerFooter, + DrawerTitle, + DrawerDescription, +}