84d6cfeb07
List, detail, new, edit pages. Server-side pagination, dietary tags, difficulty. Photo upload to S3-compatible storage. Version history. Multi-select grid with bulk delete/visibility. Print view. Delete confirmation dialog.
19 lines
459 B
TypeScript
19 lines
459 B
TypeScript
"use client";
|
|
|
|
import { Printer } from "lucide-react";
|
|
import { Button } from "@/components/ui/button";
|
|
|
|
export function PrintButton({ recipeId }: { recipeId: string }) {
|
|
function handlePrint() {
|
|
const win = window.open(`/recipes/${recipeId}/print`, "_blank", "width=800,height=900");
|
|
win?.focus();
|
|
}
|
|
|
|
return (
|
|
<Button variant="outline" size="sm" onClick={handlePrint}>
|
|
<Printer className="h-4 w-4" />
|
|
Print
|
|
</Button>
|
|
);
|
|
}
|