import type React from "react"; import Image from "next/image"; import { Card as FumadocsCard, Cards as FumadocsCards, } from "fumadocs-ui/components/card"; // Re-export fumadocs's default `` so historical imports from // `@/components/mdx-components` keep working. Fumadocs supports the // types `info | warn | warning | error | success | idea`, plus the // alias `tip` (resolves to info). Other custom types fall back to the // default tone. export { Callout } from "fumadocs-ui/components/callout"; export function Cards({ className, ...props }: React.ComponentProps) { // `not-prose` opts the wrapped Cards out of the .reference-content // prose-link styling (which forces underline + accent color on every // ). The Card's own className already controls link appearance. return ( ); } type DocsCardProps = React.ComponentProps & { logo?: string; logoAlt?: string; logoClassName?: string; }; export function Card({ href, className, style, icon, logo, logoAlt = "", logoClassName, ...props }: DocsCardProps) { // Match the docs-landing pointer-card style: // - bordered surface, accent border on hover, subtle shadow on hover // - title flips to accent color on hover via `group-hover` so the link // feels active without using a default underline // - `not-prose` is the load-bearing class: the article body uses // `.reference-content` which forces `text-decoration: underline; // color: var(--accent)` on every ; that rule wins over the // Tailwind `no-underline` class on specificity. `not-prose` // triggers the global escape-hatch rule that drops both. const resolvedHref = href?.replace(/^\/reference\/v2\//, "/reference/"); const resolvedIcon = icon ?? (logo ? ( {logoAlt} ) : undefined); const mergedClassName = [ "shell-docs-radius-surface border-[var(--border)] bg-[var(--bg-surface)] text-[var(--text)] shadow-[var(--shadow-control)]", "[&_h3]:!mt-0 [&_h3]:!mb-1.5 [&_h3]:!text-base [&_h3]:!font-semibold [&_h3]:!leading-snug [&_p]:!text-sm [&_p]:!leading-relaxed", href ? "not-prose hover:border-[var(--accent)] hover:bg-[var(--bg-elevated)]" : null, className, ] .filter(Boolean) .join(" "); return ( ); } export function Accordions({ children }: { children: React.ReactNode }) { return
{children}
; } export function Accordion({ title, children, }: { title: string; children: React.ReactNode; }) { return (
{title}
{children}
); }