Migrates the docs site from remote-config-server to this repo as a standalone static Next.js app. Key changes: - Copy app-docs from remote-config-server to docs-site/ - Configure `output: 'export'` for static HTML generation - Replace API routes with build-time scripts (search index, image copy) - Add generateStaticParams() to enumerate all doc slugs at build time - Convert server-side redirects to client-side redirects - Point DOCS_DIR to sibling ../docs directory - Add GitHub Actions workflow for deploying to GitHub Pages - Add missing Radix UI dependencies (accordion, tabs) to package.json Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
48 lines
1.2 KiB
TypeScript
48 lines
1.2 KiB
TypeScript
import { Info, Lightbulb, AlertTriangle, FileText } from "lucide-react";
|
|
|
|
const variants = {
|
|
info: {
|
|
icon: Info,
|
|
borderColor: "border-blue-400",
|
|
bgColor: "bg-blue-50 dark:bg-blue-950",
|
|
iconColor: "text-blue-500",
|
|
},
|
|
tip: {
|
|
icon: Lightbulb,
|
|
borderColor: "border-green-400",
|
|
bgColor: "bg-green-50 dark:bg-green-950",
|
|
iconColor: "text-green-500",
|
|
},
|
|
warning: {
|
|
icon: AlertTriangle,
|
|
borderColor: "border-amber-400",
|
|
bgColor: "bg-amber-50 dark:bg-amber-950",
|
|
iconColor: "text-amber-500",
|
|
},
|
|
note: {
|
|
icon: FileText,
|
|
borderColor: "border-gray-400",
|
|
bgColor: "bg-gray-50 dark:bg-gray-950",
|
|
iconColor: "text-gray-500",
|
|
},
|
|
};
|
|
|
|
export function Callout({
|
|
variant = "info",
|
|
children,
|
|
}: {
|
|
variant?: keyof typeof variants;
|
|
children: React.ReactNode;
|
|
}) {
|
|
const config = variants[variant] || variants.info;
|
|
const Icon = config.icon;
|
|
|
|
return (
|
|
<div
|
|
className={`my-4 flex gap-3 border-l-4 ${config.borderColor} ${config.bgColor} p-4 rounded-r-md`}
|
|
>
|
|
<Icon className={`h-5 w-5 mt-0.5 flex-shrink-0 ${config.iconColor}`} />
|
|
<div className="flex-1 text-sm [&>p:last-child]:mb-0">{children}</div>
|
|
</div>
|
|
);
|
|
}
|