import { Button as BaseButton } from "@mosaic/ui"; import type { ButtonProps as BaseButtonProps } from "@mosaic/ui"; import type { ReactNode, ButtonHTMLAttributes } from "react"; // Extend Button to support additional variants type ExtendedVariant = "default" | "primary" | "secondary" | "danger" | "ghost" | "outline" | "destructive" | "link"; export interface ButtonProps extends Omit { variant?: ExtendedVariant; size?: "sm" | "md" | "lg" | "icon"; children: ReactNode; } // Map extended variants to base variants const variantMap: Record = { "default": "primary", "outline": "ghost", "destructive": "danger", "link": "ghost", }; export function Button({ variant = "primary", size = "md", ...props }: ButtonProps) { const mappedVariant = variantMap[variant] || variant; const mappedSize = size === "icon" ? "sm" : size; return ; }