Files
upstream-shadcn-ui/apps/v4/registry/bases/radix/blocks/preview-02/cards/cover-art.tsx
upstream-mirror 1416db152c
All checks were successful
Release / Create Version PR or Publish Stable Release (push) Has been skipped
Release / Publish Prerelease to NPM (push) Has been skipped
Monitor Registries / Monitor registry health (push) Has been skipped
snapshot of https://github.com/shadcn-ui/ui.git (main, 2026-09-15; blobs > 131072B omitted)
2026-09-15 22:44:43 +05:00

59 lines
1.7 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { Button } from "@/registry/bases/radix/ui/button"
import {
Card,
CardContent,
CardDescription,
CardFooter,
} from "@/registry/bases/radix/ui/card"
import { Item } from "@/registry/bases/radix/ui/item"
import { Label } from "@/registry/bases/radix/ui/label"
import { IconPlaceholder } from "@/app/(create)/components/icon-placeholder"
export function CoverArt() {
return (
<Card>
<CardContent className="flex flex-col gap-3">
<Label
htmlFor="cover-art"
className="text-center text-xs font-normal tracking-wider text-muted-foreground uppercase"
>
Cover Art
</Label>
<Item className="aspect-square" variant="outline">
<label
htmlFor="cover-art"
className="flex size-full cursor-pointer items-center justify-center"
>
<IconPlaceholder
lucide="ImageIcon"
tabler="IconPhoto"
hugeicons="Image01Icon"
phosphor="ImageIcon"
remixicon="RiImageLine"
className="size-10 text-muted-foreground/50"
/>
</label>
</Item>
<input
id="cover-art"
type="file"
accept="image/jpeg,image/png"
className="sr-only"
/>
</CardContent>
<CardFooter className="flex-col gap-2">
<Button variant="secondary" className="w-full" asChild>
<label htmlFor="cover-art" className="cursor-pointer">
Upload Artwork
</label>
</Button>
<CardDescription className="text-center text-xs">
Minimum 3000 × 3000px
<br />
JPEG or PNG only
</CardDescription>
</CardFooter>
</Card>
)
}