mirror of
https://github.com/hanzoai/dev-desktop.git
synced 2026-11-23 05:52:02 +00:00
26 lines
651 B
TypeScript
26 lines
651 B
TypeScript
import { Tooltip, TooltipPopup, TooltipTrigger } from "~/components/ui/tooltip";
|
|
import { cn } from "~/lib/utils";
|
|
|
|
export function StartTruncatedPath({ path, className }: { path: string; className?: string }) {
|
|
return (
|
|
<Tooltip>
|
|
<TooltipTrigger
|
|
render={
|
|
<span
|
|
className={cn(
|
|
"min-w-0 overflow-hidden text-ellipsis whitespace-nowrap text-left",
|
|
className,
|
|
)}
|
|
dir="rtl"
|
|
/>
|
|
}
|
|
>
|
|
<bdi>{path}</bdi>
|
|
</TooltipTrigger>
|
|
<TooltipPopup side="top" variant="code">
|
|
{path}
|
|
</TooltipPopup>
|
|
</Tooltip>
|
|
);
|
|
}
|