CI / changes (push) Successful in 11s
CI / commitlint (push) Has been skipped
CI / openapi (push) Has been skipped
CI / web (push) Successful in 1m0s
CI / go (push) Successful in 1m14s
CI / bird2 (push) Successful in 19s
CI / release (push) Successful in 4m22s
Updated .mcp.json and .cursor/mcp.json to include reui configuration for HTTP API integration, specifying the URL and necessary headers. Modified components.json to enhance the @reui registry with authorization headers, improving security and access to resources.
63 lines
1.4 KiB
TypeScript
63 lines
1.4 KiB
TypeScript
import type { ReactNode } from 'react'
|
|
import { Info } from 'lucide-react'
|
|
|
|
import { cn } from '@evobgp/ui/lib/utils'
|
|
import {
|
|
Tooltip,
|
|
TooltipContent,
|
|
TooltipTrigger,
|
|
} from '@evobgp/ui/components/tooltip'
|
|
|
|
import { PanelCard } from '@/components/panel-card'
|
|
|
|
export function AnalyticsCardShell({
|
|
title,
|
|
description,
|
|
info,
|
|
actions,
|
|
footer,
|
|
className,
|
|
children,
|
|
}: {
|
|
title: string
|
|
description?: string
|
|
info?: string
|
|
actions?: ReactNode
|
|
footer?: ReactNode
|
|
className?: string
|
|
children: ReactNode
|
|
}) {
|
|
const titleNode = (
|
|
<span className="flex items-center gap-2">
|
|
{title}
|
|
{info ? (
|
|
<Tooltip>
|
|
<TooltipTrigger
|
|
className="inline-flex text-muted-foreground transition-colors hover:text-foreground"
|
|
aria-label="Подробнее"
|
|
>
|
|
<Info className="size-3.5" />
|
|
</TooltipTrigger>
|
|
<TooltipContent side="top" className="max-w-xs text-xs">
|
|
{info}
|
|
</TooltipContent>
|
|
</Tooltip>
|
|
) : null}
|
|
</span>
|
|
)
|
|
|
|
return (
|
|
<PanelCard
|
|
title={titleNode}
|
|
description={description}
|
|
actions={actions}
|
|
footer={footer}
|
|
className={cn('overflow-hidden', className)}
|
|
contentClassName="flex flex-col gap-5 py-5"
|
|
footerClassName={footer ? 'gap-2 px-5 py-4' : undefined}
|
|
>
|
|
{children}
|
|
</PanelCard>
|
|
)
|
|
}
|