"use client"; import { IconCloudDownload, IconEye, IconChevronDown, IconGitBranch, IconGitCherryPick, IconGitMerge, IconArrowRight, IconLoader2, } from "@tabler/icons-react"; import { Button } from "@kandev/ui/button"; import { HoverCard, HoverCardContent, HoverCardTrigger } from "@kandev/ui/hover-card"; import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, } from "@kandev/ui/dropdown-menu"; import { PanelHeaderBarSplit } from "./panel-primitives"; function BranchHoverCard({ displayBranch, baseBranchDisplay, }: { displayBranch: string; baseBranchDisplay: string; }) { return (
Your code lives in: and will be merged into:
{displayBranch}
{baseBranchDisplay}
); } function PullDropdown({ behindCount, isLoading, loadingOperation, onPull, onRebase, }: { behindCount: number; isLoading: boolean; loadingOperation: string | null; onPull: () => void; onRebase: () => void; }) { const isPulling = loadingOperation === "pull"; const isRebasing = loadingOperation === "rebase"; const isPullRelated = isPulling || isRebasing; return ( Pull {behindCount > 0 && ( {behindCount} behind )} Rebase {behindCount > 0 && ( {behindCount} behind )} ); } export function ChangesPanelHeader({ hasChanges, hasCommits, hasPRFiles, displayBranch, baseBranchDisplay, behindCount, isLoading, loadingOperation, onOpenDiffAll, onOpenReview, onPull, onRebase, }: { hasChanges: boolean; hasCommits: boolean; hasPRFiles?: boolean; displayBranch: string | null; baseBranchDisplay: string; behindCount: number; isLoading: boolean; loadingOperation: string | null; onOpenDiffAll?: () => void; onOpenReview?: () => void; onPull: () => void; onRebase: () => void; }) { const showDiffReview = hasChanges || hasCommits || !!hasPRFiles; return ( ) : undefined } right={ <> {displayBranch && ( )} } /> ); }