{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "slide-image",
  "title": "Slide image",
  "description": "Set of components to add an image and caption to a slide",
  "dependencies": [
    "next"
  ],
  "registryDependencies": [
    "aspect-ratio"
  ],
  "files": [
    {
      "path": "components/ui/slide-cn/slide-image.tsx",
      "content": "import { AspectRatio } from \"@/components/ui/aspect-ratio\"\nimport Image from \"next/image\"\nimport { cn } from \"@/lib/utils\"\n\n\nexport function SlideImage({ children, className, ...props }: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div className={cn(\"flex flex-col items-center gap-2\", className)} {...props}>\n\t\t\t{children}\n\t\t</div>\n\t)\n}\n\ninterface SlideImageImageProps extends React.ComponentProps<\"div\"> {\n\tsrc: string\n\talt: string\n\taspectRatio?: number\n\tobjectFit?: \"contain\" | \"cover\" | \"fill\" | \"none\" | \"scale-down\"\n\tpriority?: boolean\n\tfillContainer?: boolean\n}\n\nSlideImage.Image = function SlideImageImage({\n\tsrc,\n\talt,\n\taspectRatio = 16 / 9,\n\tclassName,\n\tobjectFit = \"cover\",\n\tpriority = false,\n\tfillContainer = false,\n\t...props\n}: SlideImageImageProps) {\n\tif (fillContainer) {\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName={cn(\"relative overflow-hidden rounded-lg bg-muted w-full h-full flex-1\", className)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t<Image\n\t\t\t\t\tsrc={src}\n\t\t\t\t\talt={alt}\n\t\t\t\t\tfill\n\t\t\t\t\tpriority={priority}\n\t\t\t\t\tclassName=\"rounded-lg\"\n\t\t\t\t\tstyle={{ objectFit }}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t)\n\t}\n\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\"relative overflow-hidden rounded-lg bg-muted w-full\", className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<AspectRatio ratio={aspectRatio}>\n\t\t\t\t<Image\n\t\t\t\t\tsrc={src}\n\t\t\t\t\talt={alt}\n\t\t\t\t\tfill\n\t\t\t\t\tpriority={priority}\n\t\t\t\t\tclassName=\"rounded-lg\"\n\t\t\t\t\tstyle={{ objectFit }}\n\t\t\t\t/>\n\t\t\t</AspectRatio>\n\t\t</div>\n\t)\n}\n\nSlideImage.Caption = function SlideImageCaption({\n\tchildren,\n\tclassName,\n\t...props\n}: React.ComponentProps<\"span\">) {\n\treturn (\n\t\t<span className={cn(\"text-sm text-muted-foreground\", className)} {...props}>\n\t\t\t{children}\n\t\t</span>\n\t)\n}\n",
      "type": "registry:component",
      "target": "components/ui/slide-cn/slide-image.tsx"
    }
  ],
  "type": "registry:component"
}