-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy patharchive-workspace.tsx
35 lines (33 loc) · 1.04 KB
/
archive-workspace.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import { Card, CardBody, Button, Text } from "@stacklok/ui-kit";
import { twMerge } from "tailwind-merge";
import { useArchiveWorkspace } from "../../workspace-system-prompt/hooks/use-archive-workspace";
export function ArchiveWorkspace({
className,
workspaceName,
}: {
workspaceName: string;
className?: string;
}) {
const { mutate, isPending } = useArchiveWorkspace();
return (
<Card className={twMerge(className, "shrink-0")}>
<CardBody>
<Text className="text-primary">Archive Workspace</Text>
<div className="flex justify-between items-center">
<Text className="flex items-center text-secondary mb-0">
Archiving this workspace removes it from the main workspaces list,
though it can be restored if needed.
</Text>
<Button
isPending={isPending}
onPress={() => {
mutate({ path: { workspace_name: workspaceName } });
}}
>
Archive
</Button>
</div>
</CardBody>
</Card>
);
}