From 526eb756b111302e8b5b8df72462a2415c71fcc2 Mon Sep 17 00:00:00 2001 From: Nawaz Dhandala Date: Fri, 27 Mar 2026 12:07:04 +0000 Subject: [PATCH] feat: Add buttonSize property to CardButtonSchema and update button styles in BaseModelTable for consistency --- Common/UI/Components/Card/Card.tsx | 12 ++++++--- .../Components/ModelTable/BaseModelTable.tsx | 25 +++++++++++-------- 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/Common/UI/Components/Card/Card.tsx b/Common/UI/Components/Card/Card.tsx index 995360fdb9..f63d0599ef 100644 --- a/Common/UI/Components/Card/Card.tsx +++ b/Common/UI/Components/Card/Card.tsx @@ -1,4 +1,4 @@ -import Button, { ButtonStyleType } from "../Button/Button"; +import Button, { ButtonSize, ButtonStyleType } from "../Button/Button"; import ShortcutKey from "../ShortcutKey/ShortcutKey"; import IconProp from "../../../Types/Icon/IconProp"; import React, { FunctionComponent, ReactElement } from "react"; @@ -12,6 +12,7 @@ export interface CardButtonSchema { isLoading?: undefined | boolean; className?: string | undefined; shortcutKey?: undefined | ShortcutKey; + buttonSize?: ButtonSize | undefined; } export interface ComponentProps { @@ -59,21 +60,21 @@ const Card: FunctionComponent = ( {(props.rightElement || (props.buttons && props.buttons.length > 0)) && ( -
+
{props.rightElement && (
{props.rightElement}
)} {props.buttons && props.buttons.length > 0 && ( -
+
{props.buttons.map( ( button: CardButtonSchema | ReactElement, i: number, ) => { return ( -
+
{React.isValidElement(button) ? button : null} {React.isValidElement(button) ? null : (