| 1 |
"use client"; |
| 2 |
|
| 3 |
import React from "react"; |
| 4 |
import { ChevronLeft, Play, Settings, MoreVertical, ExternalLink } from "lucide-react"; |
| 5 |
import { Button } from "./ui/Button"; |
| 6 |
|
| 7 |
export function Header({ workflowName, onNameChange, onBack, onSave, onToggleLogs }) { |
| 8 |
return ( |
| 9 |
<header className="h-14 bg-card border-b border-border flex items-center justify-between px-4"> |
| 10 |
<div className="flex items-center gap-4"> |
| 11 |
<div className="flex items-center gap-2 text-sm text-muted-foreground"> |
| 12 |
<input |
| 13 |
type="text" |
| 14 |
value={workflowName} |
| 15 |
onChange={(e) => onNameChange(e.target.value)} |
| 16 |
className="font-medium text-card-foreground bg-transparent border-none focus:outline-none focus:ring-1 focus:ring-primary rounded px-1" |
| 17 |
placeholder="Untitled Flow" |
| 18 |
/> |
| 19 |
</div> |
| 20 |
|
| 21 |
<Button variant="outline" size="sm" className="gap-2 bg-transparent" onClick={onBack}> |
| 22 |
<ChevronLeft className="h-4 w-4" /> |
| 23 |
Back |
| 24 |
</Button> |
| 25 |
|
| 26 |
<Button size="sm" className="gap-2 bg-primary text-primary-foreground hover:bg-primary/90" onClick={onSave}> |
| 27 |
<Play className="h-4 w-4" /> |
| 28 |
Save Flow |
| 29 |
</Button> |
| 30 |
|
| 31 |
<div className="flex items-center gap-1"> |
| 32 |
<div className="w-4 h-4 rounded-full border-2 border-muted-foreground/30" /> |
| 33 |
</div> |
| 34 |
</div> |
| 35 |
|
| 36 |
<div className="flex items-center gap-2"> |
| 37 |
<Button variant="outline" size="sm" className="gap-2 bg-transparent"> |
| 38 |
Try Pro |
| 39 |
<ExternalLink className="h-3 w-3" /> |
| 40 |
</Button> |
| 41 |
|
| 42 |
<Button variant="outline" size="sm" className="gap-2 bg-transparent" onClick={onToggleLogs}> |
| 43 |
<Settings className="h-4 w-4" /> |
| 44 |
Logs |
| 45 |
</Button> |
| 46 |
</div> |
| 47 |
</header> |
| 48 |
); |
| 49 |
} |
| 50 |
|
| 51 |
export default Header; |
| 52 |
|