import {
Example,
ExampleWrapper,
} from "@/registry/bases/radix/components/example"
import { Button } from "@/registry/bases/radix/ui/button"
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuSeparator,
DropdownMenuTrigger,
} from "@/registry/bases/radix/ui/dropdown-menu"
import { Input } from "@/registry/bases/radix/ui/input"
import {
Select,
SelectContent,
SelectGroup,
SelectItem,
SelectTrigger,
SelectValue,
} from "@/registry/bases/radix/ui/select"
import {
Table,
TableBody,
TableCaption,
TableCell,
TableFooter,
TableHead,
TableHeader,
TableRow,
} from "@/registry/bases/radix/ui/table"
import { IconPlaceholder } from "@/app/(create)/components/icon-placeholder"
const invoices = [
{
invoice: "INV001",
paymentStatus: "Paid",
totalAmount: "$250.00",
paymentMethod: "Credit Card",
},
{
invoice: "INV002",
paymentStatus: "Pending",
totalAmount: "$150.00",
paymentMethod: "PayPal",
},
{
invoice: "INV003",
paymentStatus: "Unpaid",
totalAmount: "$350.00",
paymentMethod: "Bank Transfer",
},
{
invoice: "INV004",
paymentStatus: "Paid",
totalAmount: "$450.00",
paymentMethod: "Credit Card",
},
{
invoice: "INV005",
paymentStatus: "Paid",
totalAmount: "$550.00",
paymentMethod: "PayPal",
},
{
invoice: "INV006",
paymentStatus: "Pending",
totalAmount: "$200.00",
paymentMethod: "Bank Transfer",
},
{
invoice: "INV007",
paymentStatus: "Unpaid",
totalAmount: "$300.00",
paymentMethod: "Credit Card",
},
]
export default function TableExample() {
return (
)
}
function TableBasic() {
return (
A list of your recent invoices.
Invoice
Status
Method
Amount
{invoices.slice(0, 3).map((invoice) => (
{invoice.invoice}
{invoice.paymentStatus}
{invoice.paymentMethod}
{invoice.totalAmount}
))}
)
}
function TableWithFooter() {
return (
A list of your recent invoices.
Invoice
Status
Method
Amount
{invoices.slice(0, 3).map((invoice) => (
{invoice.invoice}
{invoice.paymentStatus}
{invoice.paymentMethod}
{invoice.totalAmount}
))}
Total
$2,500.00
)
}
function TableSimple() {
return (
Name
Email
Role
Sarah Chen
sarah.chen@acme.com
Admin
Marc Rodriguez
marcus.rodriguez@acme.com
User
Emily Watson
emily.watson@acme.com
User
)
}
function TableWithBadges() {
return (
Task
Status
Priority
Design homepage
Completed
High
Implement API
In Progress
Medium
Write tests
Pending
Low
)
}
function TableWithActions() {
return (
Product
Price
Actions
Wireless Mouse
$29.99
Open menu
Edit
Duplicate
Delete
Mechanical Keyboard
$129.99
Open menu
Edit
Duplicate
Delete
USB-C Hub
$49.99
Open menu
Edit
Duplicate
Delete
)
}
function TableWithSelect() {
return (
Task
Assignee
Status
Design homepage
Sarah Chen
Marc Rodriguez
Emily Watson
David Kim
In Progress
Implement API
Sarah Chen
Marc Rodriguez
Emily Watson
David Kim
Pending
Write tests
Sarah Chen
Marc Rodriguez
Emily Watson
David Kim
Not Started
)
}
function TableWithInput() {
return (
)
}