{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"shadcn-studio/alert-07","type":"registry:component","title":"Alert 7","description":"File upload progress alert with animated progress bar, action buttons, and close functionality.","dependencies":["lucide-react"],"registryDependencies":["alert","button","progress"],"files":[{"path":"src/registry/new-york/components/alert/alert-07.tsx","content":"'use client'\n\nimport { useState, useEffect } from 'react'\n\nimport { UploadIcon, XIcon } from 'lucide-react'\n\nimport { Alert, AlertDescription, AlertTitle } from '@/registry/new-york/ui/alert'\nimport { Button } from '@/registry/new-york/ui/button'\nimport { Progress } from '@/registry/new-york/ui/progress'\n\nconst AlertFileUploadDemo = () => {\n  const [isActive, setIsActive] = useState(true)\n\n  const [progress, setProgress] = useState(0)\n\n  useEffect(() => {\n    const timer = setTimeout(() => setProgress(50), 100)\n\n    return () => clearTimeout(timer)\n  }, [])\n\n  if (!isActive) return null\n\n  return (\n    <Alert className='flex justify-between'>\n      <UploadIcon />\n      <div className='flex flex-1 flex-col gap-4'>\n        <div className='flex-1 flex-col justify-center gap-1'>\n          <AlertTitle>Uploading your &apos;Img-234.png&apos;</AlertTitle>\n          <AlertDescription>Please wait While we upload your image.</AlertDescription>\n        </div>\n        <Progress\n          value={progress}\n          className='bg-sky-600/20 *:bg-sky-600 dark:bg-sky-400/20 dark:*:bg-sky-400'\n          aria-label='Upload Progress'\n        />\n        <div className='flex items-center gap-4'>\n          <Button variant='ghost' className='h-7 cursor-pointer rounded-md px-2'>\n            Cancel\n          </Button>\n          <Button\n            variant='ghost'\n            disabled\n            className='h-7 cursor-pointer rounded-md px-2 text-sky-600 hover:bg-sky-600/10 hover:text-sky-600 dark:text-sky-400 dark:hover:bg-sky-400/10 dark:hover:text-sky-400'\n          >\n            Upload another\n          </Button>\n        </div>\n      </div>\n      <button className='size-5 cursor-pointer' onClick={() => setIsActive(false)}>\n        <XIcon className='size-5' />\n        <span className='sr-only'>Close</span>\n      </button>\n    </Alert>\n  )\n}\n\nexport default AlertFileUploadDemo\n","type":"registry:component","target":"components/shadcn-studio/alert/alert-07.tsx"}]}