24 lines
702 B
TypeScript
24 lines
702 B
TypeScript
"use client";
|
|
|
|
import { useState } from "react";
|
|
import { Button } from "@/components/ui/button";
|
|
import { SettingsIcon } from "lucide-react";
|
|
import { ManageStorageDialog } from "@/components/frontend/storage/ManageStorageDialog";
|
|
|
|
interface ManageStorageButtonProps {
|
|
structureId: number;
|
|
}
|
|
|
|
export function ManageStorageButton({ structureId }: ManageStorageButtonProps) {
|
|
const [open, setOpen] = useState(false);
|
|
|
|
return (
|
|
<>
|
|
<Button variant="outline" size="sm" onClick={() => setOpen(true)}>
|
|
<SettingsIcon className="size-3.5 mr-1.5" />
|
|
Manage
|
|
</Button>
|
|
<ManageStorageDialog structureId={structureId} open={open} onOpenChange={setOpen} />
|
|
</>
|
|
);
|
|
}
|