mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-06 00:27:24 +00:00
DeployPopover -> DeployButton, remove deploy barrel export
This commit is contained in:
4 files changed
+12
-14
No files matched your search
@@ -0,0 +1,44 @@
|
||||
import { useState } from 'react';
|
||||
import { Rocket } from 'lucide-react';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';
|
||||
import { cn } from '@/lib/utils';
|
||||
import { DeploySteps } from './DeploySteps';
|
||||
|
||||
interface DeployButtonProps {
|
||||
projectId: string;
|
||||
projectName: string;
|
||||
className?: string;
|
||||
disabled?: boolean;
|
||||
}
|
||||
|
||||
export function DeployButton({ projectId, projectName, className, disabled }: DeployButtonProps) {
|
||||
const [open, setOpen] = useState(false);
|
||||
|
||||
return (
|
||||
<Popover open={open} onOpenChange={setOpen}>
|
||||
<PopoverTrigger asChild>
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
className={cn("h-8 w-8 p-0", className)}
|
||||
aria-label="Deploy project"
|
||||
disabled={disabled}
|
||||
>
|
||||
<Rocket className="size-5 text-muted-foreground" />
|
||||
</Button>
|
||||
</PopoverTrigger>
|
||||
<PopoverContent
|
||||
align="start"
|
||||
className="w-96"
|
||||
onOpenAutoFocus={(e) => e.preventDefault()}
|
||||
>
|
||||
<DeploySteps
|
||||
projectId={projectId}
|
||||
projectName={projectName}
|
||||
onClose={() => setOpen(false)}
|
||||
/>
|
||||
</PopoverContent>
|
||||
</Popover>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user