Skip to content

Commit

Permalink
drawer added to refund button
Browse files Browse the repository at this point in the history
  • Loading branch information
0xCSMNT committed Jan 17, 2024
1 parent 5de8e6e commit 99792ac
Showing 1 changed file with 39 additions and 6 deletions.
45 changes: 39 additions & 6 deletions shop/src/app/dashboard/components/refund-button.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,42 @@
import { PrimaryButton as Button } from '@/components/ui/button'

export function RefundButton() {
return(
<Button className="text-xs ml-4 transition:colors hover:text-secondary hover:bg-primary-foreground">Refund</Button>
)

import {
Drawer,
DrawerClose,
DrawerContent,
DrawerDescription,
DrawerFooter,
DrawerHeader,
DrawerTitle,
DrawerTrigger,
} from '@/components/ui/drawer'

}
export function RefundButton() {
return (
<Drawer>
<DrawerTrigger asChild>
<Button className="text-xs ml-4 transition:colors hover:text-secondary hover:bg-primary-foreground">
Refund
</Button>
</DrawerTrigger>
<DrawerContent className="mx-auto w-full max-w-md">
<DrawerHeader>
<DrawerTitle className="text-2xl text-center font-semibold">
Refund Customer Order
</DrawerTitle>
<DrawerDescription className="text-md text-center">
Revert On-Chain Transaction
</DrawerDescription>
</DrawerHeader>
<DrawerFooter className="flex justify-end space-x-4">
<DrawerClose asChild>
<Button variant="outline" className="px-4 py-2">
Cancel
</Button>
</DrawerClose>
<Button className="px-4 py-2 bg-primary text-white">Refund</Button>
</DrawerFooter>
</DrawerContent>
</Drawer>
)
}

0 comments on commit 99792ac

Please sign in to comment.