| 188 | } |
| 189 | |
| 190 | function CardStackContent({ className, ...props }: React.ComponentProps<"div">) { |
| 191 | const { collapsible } = React.useContext(CardStackContext); |
| 192 | |
| 193 | if (collapsible) { |
| 194 | return ( |
| 195 | <CollapsiblePrimitive.Content className="overflow-hidden transition-[height] duration-200 ease-[cubic-bezier(0.23,1,0.32,1)] data-[state=closed]:h-0 data-[state=open]:h-[var(--radix-collapsible-content-height)]"> |
| 196 | <div |
| 197 | data-slot="card-stack-content" |
| 198 | className={cn( |
| 199 | "flex flex-col border-t border-border/50 first:border-t-0", |
| 200 | "[&>*+*]:relative [&>*+*]:before:pointer-events-none [&>*+*]:before:absolute [&>*+*]:before:inset-x-0 [&>*+*]:before:top-0 [&>*+*]:before:h-px [&>*+*]:before:bg-border/50", |
| 201 | className, |
| 202 | )} |
| 203 | {...props} |
| 204 | /> |
| 205 | </CollapsiblePrimitive.Content> |
| 206 | ); |
| 207 | } |
| 208 | |
| 209 | return ( |
| 210 | <div |
| 211 | data-slot="card-stack-content" |
| 212 | className={cn( |
| 213 | "flex flex-col border-t border-border/50 first:border-t-0", |
| 214 | "[&>*+*]:relative [&>*+*]:before:pointer-events-none [&>*+*]:before:absolute [&>*+*]:before:inset-x-0 [&>*+*]:before:top-0 [&>*+*]:before:h-px [&>*+*]:before:bg-border/50", |
| 215 | className, |
| 216 | )} |
| 217 | {...props} |
| 218 | /> |
| 219 | ); |
| 220 | } |
| 221 | |
| 222 | type CardStackEntryProps = React.ComponentProps<"div"> & { |
| 223 | asChild?: boolean; |