Function
Item
({
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 | |
| 54 | function 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 | |
| 74 | const 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
Tested by
no test coverage detected