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
| 49 | ); |
| 50 | |
| 51 | function Item({ |
| 52 | className, |
| 53 | variant = "default", |
| 54 | size = "default", |
| 55 | asChild = false, |
| 56 | ...props |
| 57 | }: React.ComponentProps<"div"> & VariantProps<typeof itemVariants> & { asChild?: boolean }) { |
| 58 | const Comp = asChild ? Slot.Root : "div"; |
| 59 | return ( |
| 60 | <Comp |
| 61 | data-slot="item" |
| 62 | data-variant={variant} |
| 63 | data-size={size} |
| 64 | className={cn(itemVariants({ variant, size, className }))} |
| 65 | {...props} |
| 66 | /> |
| 67 | ); |
| 68 | } |
| 69 | |
| 70 | const itemMediaVariants = cva( |
| 71 | "flex shrink-0 items-center justify-center gap-2 group-has-[[data-slot=item-description]]/item:translate-y-0.5 group-has-[[data-slot=item-description]]/item:self-start [&_svg]:pointer-events-none", |
Callers
nothing calls this directly
Tested by
no test coverage detected