MCPcopy Create free account
hub / github.com/code-with-antonio/nodebase / Item

Function Item

src/components/ui/item.tsx:54–72  ·  view source on GitHub ↗
({
  className,
  variant = "default",
  size = "default",
  asChild = false,
  ...props
}: React.ComponentProps<"div"> &
  VariantProps<typeof itemVariants> & { asChild?: boolean })

Source from the content-addressed store, hash-verified

52)
53
54function Item({
55 className,
56 variant = "default",
57 size = "default",
58 asChild = false,
59 ...props
60}: React.ComponentProps<"div"> &
61 VariantProps<typeof itemVariants> & { asChild?: boolean }) {
62 const Comp = asChild ? Slot : "div"
63 return (
64 <Comp
65 data-slot="item"
66 data-variant={variant}
67 data-size={size}
68 className={cn(itemVariants({ variant, size, className }))}
69 {...props}
70 />
71 )
72}
73
74const itemMediaVariants = cva(
75 "flex shrink-0 items-center justify-center gap-2 group-has-[[data-slot=item-description]]/item:self-start [&_svg]:pointer-events-none group-has-[[data-slot=item-description]]/item:translate-y-0.5",

Callers

nothing calls this directly

Calls 1

cnFunction · 0.90

Tested by

no test coverage detected