Home / File/ docs-base-switcher.tsx — ui Source File

docs-base-switcher.tsx — ui Source File

Architecture documentation for docs-base-switcher.tsx, a tsx file in the ui codebase. 3 imports, 0 dependents.

File tsx Internationalization RTLLayout 3 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  17c333aa_bf45_357a_f834_7ae8a18eb16c["docs-base-switcher.tsx"]
  ba3d44f3_7b34_f9cc_6283_44817785c0df["link"]
  17c333aa_bf45_357a_f834_7ae8a18eb16c --> ba3d44f3_7b34_f9cc_6283_44817785c0df
  79081a1f_55a3_945a_fb8c_d53d6d3eab81["utils"]
  17c333aa_bf45_357a_f834_7ae8a18eb16c --> 79081a1f_55a3_945a_fb8c_d53d6d3eab81
  c544a3e1_3972_d827_a6cc_0c6a194dbe9e["bases"]
  17c333aa_bf45_357a_f834_7ae8a18eb16c --> c544a3e1_3972_d827_a6cc_0c6a194dbe9e
  style 17c333aa_bf45_357a_f834_7ae8a18eb16c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import Link from "next/link"

import { cn } from "@/lib/utils"
import { BASES } from "@/registry/bases"

export function DocsBaseSwitcher({
  base,
  component,
  className,
}: {
  base: string
  component: string
  className?: string
}) {
  const activeBase = BASES.find((baseItem) => base === baseItem.name)

  return (
    <div className={cn("inline-flex w-full items-center gap-6", className)}>
      {BASES.map((baseItem) => (
        <Link
          key={baseItem.name}
          href={`/docs/components/${baseItem.name}/${component}`}
          data-active={base === baseItem.name}
          className="text-muted-foreground hover:text-foreground data-[active=true]:text-foreground after:bg-foreground relative inline-flex items-center justify-center gap-1 pt-1 pb-0.5 text-base font-medium transition-colors after:absolute after:inset-x-0 after:bottom-[-4px] after:h-0.5 after:opacity-0 after:transition-opacity data-[active=true]:after:opacity-100"
        >
          {baseItem.title}
        </Link>
      ))}
      {activeBase?.meta?.logo && (
        <div
          className="text-muted-foreground ml-auto size-4 shrink-0 opacity-80 [&_svg]:size-4"
          dangerouslySetInnerHTML={{
            __html: activeBase.meta.logo,
          }}
        />
      )}
    </div>
  )
}

Subdomains

Functions

Dependencies

  • bases
  • link
  • utils

Frequently Asked Questions

What does docs-base-switcher.tsx do?
docs-base-switcher.tsx is a source file in the ui codebase, written in tsx. It belongs to the Internationalization domain, RTLLayout subdomain.
What functions are defined in docs-base-switcher.tsx?
docs-base-switcher.tsx defines 1 function(s): DocsBaseSwitcher.
What does docs-base-switcher.tsx depend on?
docs-base-switcher.tsx imports 3 module(s): bases, link, utils.
Where is docs-base-switcher.tsx in the architecture?
docs-base-switcher.tsx is located at apps/v4/components/docs-base-switcher.tsx (domain: Internationalization, subdomain: RTLLayout, directory: apps/v4/components).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free