[feat] negodata/front: 협상완료 부가정보 협상현황 모달·아이콘 툴팁(base-ui)·헤더 회사명 모바일 전용
This commit is contained in:
1 parent
08c1e66582
commit
bb576af346
5 files changed
+146
-44
No files matched your search
@@ -502,16 +502,16 @@ function HeaderMeta({ user, today }: { user: SidebarUser; today: string }) {
|
||||
<Typography as="div" variant="caption" className="hidden lg:block">
|
||||
기준일시: <span className="font-semibold text-foreground">{today}</span>
|
||||
</Typography>
|
||||
<div className="h-4 w-px bg-border hidden lg:block" />
|
||||
|
||||
<div className="flex items-center gap-2 min-w-0">
|
||||
{/* 회사명은 모바일에서만 — 데스크톱은 사이드바 브랜드에 이미 노출 */}
|
||||
<div className="flex items-center gap-2 min-w-0 md:hidden">
|
||||
<span className="inline-block h-2 w-2 rounded-full bg-success animate-pulse shrink-0" />
|
||||
<Typography as="span" variant="caption" className="shrink-0">회사:</Typography>
|
||||
<Typography
|
||||
as="span"
|
||||
variant="caption"
|
||||
id="header-company-name"
|
||||
className="font-bold text-foreground truncate max-w-[140px] md:max-w-none"
|
||||
className="font-bold text-foreground truncate max-w-[140px]"
|
||||
>
|
||||
{user?.company}
|
||||
</Typography>
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
import { Tooltip as TooltipPrimitive } from '@base-ui/react/tooltip'
|
||||
import { cn } from '@/lib/utils'
|
||||
|
||||
// base-ui 기반 툴팁(프로젝트가 radix 아닌 @base-ui/react — tabs/select 와 동일 계열).
|
||||
function Tooltip(props: TooltipPrimitive.Root.Props) {
|
||||
return (
|
||||
<TooltipPrimitive.Provider delay={100}>
|
||||
<TooltipPrimitive.Root {...props} />
|
||||
</TooltipPrimitive.Provider>
|
||||
)
|
||||
}
|
||||
|
||||
function TooltipTrigger(props: TooltipPrimitive.Trigger.Props) {
|
||||
return <TooltipPrimitive.Trigger {...props} />
|
||||
}
|
||||
|
||||
function TooltipContent({
|
||||
className,
|
||||
sideOffset = 6,
|
||||
children,
|
||||
...props
|
||||
}: TooltipPrimitive.Popup.Props & { sideOffset?: number }) {
|
||||
return (
|
||||
<TooltipPrimitive.Portal>
|
||||
<TooltipPrimitive.Positioner sideOffset={sideOffset} className="z-50">
|
||||
<TooltipPrimitive.Popup
|
||||
className={cn(
|
||||
'rounded-md bg-foreground px-2 py-1 text-[11px] font-medium text-background shadow-md whitespace-nowrap',
|
||||
className,
|
||||
)}
|
||||
{...props}
|
||||
>
|
||||
{children}
|
||||
</TooltipPrimitive.Popup>
|
||||
</TooltipPrimitive.Positioner>
|
||||
</TooltipPrimitive.Portal>
|
||||
)
|
||||
}
|
||||
|
||||
export { Tooltip, TooltipTrigger, TooltipContent }
|
||||
Reference in new issue
Block a user