This commit is contained in:
Riccardo Giorato
2025-12-26 17:30:08 +01:00
parent 4e4ce9ed35
commit 9895200db6
3 changed files with 179 additions and 168 deletions
+26 -10
View File
@@ -1,16 +1,21 @@
"use client"
"use client";
import { ArrowLeft, RefreshCw, Download, Plus, Info } from "lucide-react"
import { Button } from "@/components/ui/button"
import { useRouter } from "next/navigation"
import { ArrowLeft, RefreshCw, Download, Plus, Info } from "lucide-react";
import { Button } from "@/components/ui/button";
import { useRouter } from "next/navigation";
interface EditorToolbarProps {
title: string
onInfoClick: () => void
title: string;
onInfoClick: () => void;
onContinueStory?: () => void;
}
export function EditorToolbar({ title, onInfoClick }: EditorToolbarProps) {
const router = useRouter()
export function EditorToolbar({
title,
onInfoClick,
onContinueStory,
}: EditorToolbarProps) {
const router = useRouter();
return (
<header className="h-14 border-b border-border/50 bg-background/80 backdrop-blur-md flex items-center justify-between px-3 sm:px-4">
@@ -24,7 +29,9 @@ export function EditorToolbar({ title, onInfoClick }: EditorToolbarProps) {
<ArrowLeft className="w-4 h-4 sm:w-5 sm:h-5" />
</Button>
<h1 className="text-sm sm:text-base text-white font-normal tracking-[-0.02em] truncate">{title}</h1>
<h1 className="text-sm sm:text-base text-white font-normal tracking-[-0.02em] truncate">
{title}
</h1>
</div>
<div className="flex items-center gap-1 sm:gap-2 flex-shrink-0">
@@ -52,7 +59,16 @@ export function EditorToolbar({ title, onInfoClick }: EditorToolbarProps) {
<Download className="w-3.5 h-3.5 sm:w-4 sm:h-4" />
<span>Download PDF</span>
</Button>
<Button
onClick={onContinueStory}
className="gap-1.5 sm:gap-2 text-xs bg-white hover:bg-neutral-200 text-black h-8 sm:h-9 px-3 sm:px-4"
>
<Plus className="w-3.5 h-3.5 sm:w-4 sm:h-4" />
<span className="hidden sm:inline">Continue story</span>
<span className="sm:hidden">Add</span>
</Button>
</div>
</header>
)
);
}