Files
ftdt-quant-lab/dashboard-next/src/components/ui/button.tsx
T
ramseshk a09954017e Recreate Next.js source — shadcn components, chart, types, hooks
Source files were untracked and lost during reset. Recreated:
- page.tsx (full 3-tab dashboard), layout.tsx, globals.css (shadcn theme)
- types.ts, api.ts, utils.ts
- strategy-card.tsx, equity-chart.tsx, positions-panel.tsx
- ui/ (7 shadcn wrappers: card, badge, button, table, tabs, sheet, collapsible, select)
- Config files: next.config.ts, tsconfig.json, postcss.config.mjs, components.json
2026-08-05 05:05:26 +00:00

38 lines
1.2 KiB
TypeScript

import * as React from "react";
import { cn } from "@/lib/utils";
function Button({
className,
variant = "default",
size = "default",
...props
}: React.ComponentProps<"button"> & {
variant?: "default" | "ghost" | "outline";
size?: "default" | "sm" | "icon";
}) {
const variants: Record<string, string> = {
default: "bg-primary text-primary-foreground hover:bg-primary/90",
ghost: "hover:bg-accent hover:text-accent-foreground",
outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
};
const sizes: Record<string, string> = {
default: "h-9 px-4 py-2",
sm: "h-8 rounded-md px-3 text-xs",
icon: "h-9 w-9",
};
return (
<button
data-slot="button"
className={cn(
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
variants[variant],
sizes[size],
className,
)}
{...props}
/>
);
}
export { Button };