mirror of
https://github.com/hanzoai/shadcn.git
synced 2026-10-30 18:22:59 +00:00
Squash merge of shadcn-ui/ui main branch into hanzo/ui, bringing in: - [email protected] through [email protected] releases - New apps/v4 directory structure - Registry system improvements and MCP server - Framework support (Vue, Svelte, React Native) - New templates (vite-app, monorepo-next, laravel) - Zod 4 compatibility (scoped override for zod@>4) - Test fixture corrections for alias resolution All 867 merge conflicts resolved preserving Hanzo customizations. 1020/1020 shadcn tests pass.
59 lines
1.5 KiB
TypeScript
59 lines
1.5 KiB
TypeScript
import * as React from "react"
|
|
import { Avatar, AvatarFallback, AvatarImage } from "@/examples/base/ui/avatar"
|
|
import { Button } from "@/examples/base/ui/button"
|
|
import {
|
|
Item,
|
|
ItemActions,
|
|
ItemContent,
|
|
ItemDescription,
|
|
ItemGroup,
|
|
ItemMedia,
|
|
ItemSeparator,
|
|
ItemTitle,
|
|
} from "@/examples/base/ui/item"
|
|
import { PlusIcon } from "lucide-react"
|
|
|
|
const people = [
|
|
{
|
|
username: "shadcn",
|
|
avatar: "https://github.com/shadcn.png",
|
|
email: "[email protected]",
|
|
},
|
|
{
|
|
username: "maxleiter",
|
|
avatar: "https://github.com/maxleiter.png",
|
|
email: "[email protected]",
|
|
},
|
|
{
|
|
username: "evilrabbit",
|
|
avatar: "https://github.com/evilrabbit.png",
|
|
email: "[email protected]",
|
|
},
|
|
]
|
|
|
|
export function ItemGroupExample() {
|
|
return (
|
|
<ItemGroup className="max-w-sm">
|
|
{people.map((person, index) => (
|
|
<Item key={person.username} variant="outline">
|
|
<ItemMedia>
|
|
<Avatar>
|
|
<AvatarImage src={person.avatar} className="grayscale" />
|
|
<AvatarFallback>{person.username.charAt(0)}</AvatarFallback>
|
|
</Avatar>
|
|
</ItemMedia>
|
|
<ItemContent className="gap-1">
|
|
<ItemTitle>{person.username}</ItemTitle>
|
|
<ItemDescription>{person.email}</ItemDescription>
|
|
</ItemContent>
|
|
<ItemActions>
|
|
<Button variant="ghost" size="icon" className="rounded-full">
|
|
<PlusIcon />
|
|
</Button>
|
|
</ItemActions>
|
|
</Item>
|
|
))}
|
|
</ItemGroup>
|
|
)
|
|
}
|