Files
zeekay dacabef7d6 Fix finance component registry exports for React.lazy
React.lazy expects default exports, but all finance registry files were
using named exports. This caused build failures with the error:
"Element type is invalid: expected a string ... but got: undefined"

Changes:
- Updated all finance registry files to import and re-export as default
- Removed non-existent mini-chart and symbol-overview MDX files
- Updated sidebar navigation to remove mini-chart and symbol-overview
- Fixed market-overview, ticker-tape, and trading-panel registry files

The finance components now properly load in ComponentPreview during
static site generation.
2025-11-10 10:02:11 -08:00

10 lines
2.1 KiB
JSON

{
"name": "code-tabs",
"files": [
{
"name": "code-tabs.tsx",
"content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nexport interface CodeTabsProps extends React.HTMLAttributes<HTMLDivElement> {\n tabs?: Array<{\n label: string\n language: string\n code: string\n }>\n defaultTab?: number\n}\n\nconst CodeTabs = React.forwardRef<HTMLDivElement, CodeTabsProps>(\n ({ className, tabs = [], defaultTab = 0, ...props }, ref) => {\n const [activeTab, setActiveTab] = React.useState(defaultTab)\n\n if (tabs.length === 0) {\n return (\n <div\n ref={ref}\n className={cn(\n \"rounded-lg border bg-card p-6 text-card-foreground shadow-sm\",\n className\n )}\n {...props}\n >\n <p className=\"text-sm text-muted-foreground\">\n No code tabs available. Add tabs to display code snippets.\n </p>\n </div>\n )\n }\n\n return (\n <div\n ref={ref}\n className={cn(\n \"rounded-lg border bg-card text-card-foreground shadow-sm\",\n className\n )}\n {...props}\n >\n <div className=\"border-b\">\n <div className=\"flex gap-1 p-2\">\n {tabs.map((tab, index) => (\n <button\n key={index}\n onClick={() => setActiveTab(index)}\n className={cn(\n \"rounded-md px-4 py-2 text-sm font-medium transition-colors\",\n activeTab === index\n ? \"bg-primary text-primary-foreground\"\n : \"hover:bg-muted\"\n )}\n >\n {tab.label}\n </button>\n ))}\n </div>\n </div>\n\n <div className=\"p-4\">\n <pre className=\"overflow-x-auto rounded-md bg-muted p-4\">\n <code className=\"text-sm\">{tabs[activeTab]?.code}</code>\n </pre>\n </div>\n </div>\n )\n }\n)\n\nCodeTabs.displayName = \"CodeTabs\"\n\nexport { CodeTabs }\n"
}
],
"type": "components:ui"
}