Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

540 B
Raw Blame
import type { ReactElement } from "react";
import {
  Tooltip,
  TooltipContent,
  TooltipTrigger,
} from "@/components/ui/tooltip";
import { useCompactBar } from "./use-compact-bar";

type BarTooltipProps = {
  label: string;
  children: ReactElement;
};

export function BarTooltip({ label, children }: BarTooltipProps) {
  const compact = useCompactBar();
  if (!compact) return children;
  return (
    <Tooltip>
      <TooltipTrigger render={children} />
      <TooltipContent side="top">{label}</TooltipContent>
    </Tooltip>
  );
}