billing-2
7ovr/billing-2FreeBlock
A billing invoices card displaying a table of past invoices with invoice number, date, amount, a status badge, and a per-row download link.
Install it
npx shadcn@latest add https://7ovr.com/r/billing-2.jsonSource
1"use client"23import * as React from "react"4import { RiDownloadLine } from "@remixicon/react"5import { toast } from "sonner"67import { Badge } from "@/components/ui/badge"8import { Button } from "@/components/ui/button"9import {10 Card,11 CardAction,12 CardContent,13 CardDescription,14 CardHeader,15 CardTitle,16} from "@/components/ui/card"17import { Checkbox } from "@/components/ui/checkbox"18import {19 Table,20 TableBody,21 TableCell,22 TableHead,23 TableHeader,24 TableRow,25} from "@/components/ui/table"26import { Toaster } from "@/components/ui/sonner"2728type InvoiceStatus = "Paid" | "Pending" | "Failed"2930const INVOICES: {31 id: string32 date: string33 amount: string34 status: InvoiceStatus35}[] = [36 {37 id: "INV-2026-0047",38 date: "Jun 1, 2026",39 amount: "$149.00",40 status: "Paid",41 },42 {43 id: "INV-2026-0031",44 date: "May 1, 2026",45 amount: "$149.00",46 status: "Paid",47 },48 {49 id: "INV-2026-0018",50 date: "Apr 1, 2026",51 amount: "$99.00",52 status: "Paid",53 },54 {55 id: "INV-2026-0009",56 date: "Mar 1, 2026",57 amount: "$99.00",58 status: "Failed",59 },60 {61 id: "INV-2026-0004",62 date: "Feb 1, 2026",63 amount: "$99.00",64 status: "Paid",65 },66 {67 id: "INV-2025-0089",68 date: "Jan 1, 2026",69 amount: "$49.00",70 status: "Pending",71 },72 {73 id: "INV-2025-0074",74 date: "Dec 1, 2025",75 amount: "$49.00",76 status: "Paid",77 },78]7980const STATUS_VARIANT: Record<81 InvoiceStatus,82 "default" | "secondary" | "destructive" | "outline"83> = {84 Paid: "secondary",85 Pending: "outline",86 Failed: "destructive",87}8889export default function BillingBlock() {90 const [selected, setSelected] = React.useState<Record<string, boolean>>({})9192 const selectedIds = INVOICES.filter((i) => selected[i.id]).map((i) => i.id)93 const allSelected = selectedIds.length === INVOICES.length94 const someSelected = selectedIds.length > 0 && !allSelected9596 function toggleAll(checked: boolean) {97 setSelected(98 checked ? Object.fromEntries(INVOICES.map((i) => [i.id, true])) : {}99 )100 }101102 function handleDownload(id: string) {103 toast.success("Invoice downloaded", {104 description: `${id} has been saved to your device.`,105 })106 }107108 function handleBulkDownload() {109 toast.success(110 `Downloading ${selectedIds.length} ${111 selectedIds.length === 1 ? "invoice" : "invoices"112 }`,113 { description: "Your files are being prepared." }114 )115 }116117 return (118// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from 7ovr
All 235 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| about-1about-1 | 7ovr | Blocks | Free | 2 deps | |
| about-2about-2 | 7ovr | Blocks | Free | 2 deps | |
| about-3about-3 | 7ovr | Blocks | Free | 2 deps | |
| about-4about-4 | 7ovr | Blocks | Free | 2 deps | |
| activity-1activity-1 | 7ovr | Blocks | Free | 2 deps | |
| activity-2activity-2 | 7ovr | Blocks | Free | 2 deps | |
| activity-3activity-3 | 7ovr | Blocks | Free | 2 deps | |
| activity-4activity-4 | 7ovr | Blocks | Free | 2 deps |
