fix: resolve all TypeScript errors in web app
This commit is contained in:
@@ -3,9 +3,9 @@ import type { ButtonProps as BaseButtonProps } from "@mosaic/ui";
|
||||
import type { ReactNode, ButtonHTMLAttributes } from "react";
|
||||
|
||||
// Extend Button to support additional variants
|
||||
type ExtendedVariant = "primary" | "secondary" | "danger" | "ghost" | "outline" | "destructive" | "link";
|
||||
type ExtendedVariant = "default" | "primary" | "secondary" | "danger" | "ghost" | "outline" | "destructive" | "link";
|
||||
|
||||
export interface ButtonProps extends Omit<BaseButtonProps, "variant"> {
|
||||
export interface ButtonProps extends Omit<BaseButtonProps, "variant" | "size"> {
|
||||
variant?: ExtendedVariant;
|
||||
size?: "sm" | "md" | "lg" | "icon";
|
||||
children: ReactNode;
|
||||
@@ -13,6 +13,7 @@ export interface ButtonProps extends Omit<BaseButtonProps, "variant"> {
|
||||
|
||||
// Map extended variants to base variants
|
||||
const variantMap: Record<string, "primary" | "secondary" | "danger" | "ghost"> = {
|
||||
"default": "primary",
|
||||
"outline": "ghost",
|
||||
"destructive": "danger",
|
||||
"link": "ghost",
|
||||
|
||||
Reference in New Issue
Block a user