AI store generator for ecommerce, Malaysia first. Laravel 13 + React + TypeScript.
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

card.tsx 1.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. import * as React from "react"
  2. import { cn } from "@/lib/utils"
  3. function Card({ className, ...props }: React.ComponentProps<"div">) {
  4. return (
  5. <div
  6. data-slot="card"
  7. className={cn(
  8. "bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",
  9. className
  10. )}
  11. {...props}
  12. />
  13. )
  14. }
  15. function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
  16. return (
  17. <div
  18. data-slot="card-header"
  19. className={cn("flex flex-col gap-1.5 px-6", className)}
  20. {...props}
  21. />
  22. )
  23. }
  24. function CardTitle({ className, ...props }: React.ComponentProps<"div">) {
  25. return (
  26. <div
  27. data-slot="card-title"
  28. className={cn("leading-none font-semibold", className)}
  29. {...props}
  30. />
  31. )
  32. }
  33. function CardDescription({ className, ...props }: React.ComponentProps<"div">) {
  34. return (
  35. <div
  36. data-slot="card-description"
  37. className={cn("text-muted-foreground text-sm", className)}
  38. {...props}
  39. />
  40. )
  41. }
  42. function CardContent({ className, ...props }: React.ComponentProps<"div">) {
  43. return (
  44. <div
  45. data-slot="card-content"
  46. className={cn("px-6", className)}
  47. {...props}
  48. />
  49. )
  50. }
  51. function CardFooter({ className, ...props }: React.ComponentProps<"div">) {
  52. return (
  53. <div
  54. data-slot="card-footer"
  55. className={cn("flex items-center px-6", className)}
  56. {...props}
  57. />
  58. )
  59. }
  60. export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent }