"use client"
import * as React from "react"
import {
Example,
ExampleWrapper,
} from "@/registry/bases/base/components/example"
import {
Attachment,
AttachmentAction,
AttachmentActions,
AttachmentContent,
AttachmentDescription,
AttachmentGroup,
AttachmentMedia,
AttachmentTitle,
AttachmentTrigger,
} from "@/registry/bases/base/ui/attachment"
import { Button } from "@/registry/bases/base/ui/button"
import {
Dialog,
DialogContent,
DialogDescription,
DialogHeader,
DialogTitle,
DialogTrigger,
} from "@/registry/bases/base/ui/dialog"
import { Spinner } from "@/registry/bases/base/ui/spinner"
import { IconPlaceholder } from "@/app/(create)/components/icon-placeholder"
export default function AttachmentExample() {
return (
)
}
function AttachmentFiles() {
return (
Horizontal
sales-dashboard.pdf
PDF · 2.4 MB
customer-import.csv
CSV · 18 KB
message-renderer.tsx
TypeScript · 12 KB
Vertical
sales-dashboard.pdf
PDF · 2.4 MB
customer-import.csv
CSV · 18 KB
message-renderer.tsx
TypeScript · 12 KB
source-assets.zip
ZIP · 4.2 MB
quarterly-review.key
Keynote · 9 MB
)
}
function AttachmentContentOnly() {
return (
Title
React Documentation
Tailwind CSS
shadcn/ui
}
/>
Title and Description
Building accessible components
react.dev · 8 min read
Utility-first CSS framework
tailwindcss.com
Compound components in React
ui.shadcn.com/docs
}
/>
)
}
function AttachmentStates() {
return (
Horizontal
selected-file.pdf
Ready to upload
design-system.zip
Uploading · 64%
market-research.pdf
Processing document
financial-model.xlsx
Upload failed. Try again.
uploaded-report.pdf
Uploaded · 1.8 MB
Vertical
selected-file.pdf
Ready
design-system.zip
Uploading
market-research.pdf
Processing
financial-model.xlsx
Failed
uploaded-report.pdf
Done
)
}
function AttachmentImages() {
return (
)
}
function AttachmentImageStates() {
return (
)
}
function AttachmentSizes() {
return (
Default attachment
PDF · 2.4 MB
Small attachment
PDF · 2.4 MB
Extra small attachment
)
}
function AttachmentScrollableGroup() {
return (
briefing-notes.pdf
PDF · 1.4 MB
workspace.png
PNG · 820 KB
customers.csv
CSV · 18 KB
renderer.tsx
TSX · 12 KB
invoice.pdf
PDF
desk.jpg
JPG
assets.zip
ZIP
office.jpg
JPG
notes.pdf
PDF
)
}
function AttachmentTriggers() {
const [isVisible, setIsVisible] = React.useState(true)
return (
{isVisible ? (
contract-review.pdf
PDF · 820 KB
setIsVisible(false)}
>
}
/>
) : (
)}
)
}