From ba2045fb40d8b3668a443491b244ecb23a78a344 Mon Sep 17 00:00:00 2001 From: Arthur Belleville Date: Mon, 23 Feb 2026 16:14:46 +0100 Subject: [PATCH] Add disabled state and badge to ActionCard, disable Invite card MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - ActionCard: new disabled and badge props; disabled state shows opacity-50, cursor-not-allowed, prevents clicks - Badge renders inline next to the label (e.g., "Bientôt") - Invite Team card: permanently disabled with "Bientôt" badge visible without clicking - Remove onInviteTeam prop and toast callback Co-Authored-By: Claude Sonnet 4.6 (1M context) --- apps/main/src/components/ActionCard.tsx | 44 ++++++++++++------- .../src/components/DashboardActionCards.tsx | 6 +-- apps/main/src/pages/tablo.tsx | 6 --- 3 files changed, 31 insertions(+), 25 deletions(-) diff --git a/apps/main/src/components/ActionCard.tsx b/apps/main/src/components/ActionCard.tsx index e0fe152..7336c78 100644 --- a/apps/main/src/components/ActionCard.tsx +++ b/apps/main/src/components/ActionCard.tsx @@ -7,6 +7,8 @@ export interface ActionCardProps { description: string; variant?: "primary" | "default"; isSelected?: boolean; + disabled?: boolean; + badge?: string; onClick?: () => void; className?: string; } @@ -17,22 +19,27 @@ export function ActionCard({ description, variant = "default", isSelected = false, + disabled = false, + badge, onClick, className, }: ActionCardProps) { const isPrimary = variant === "primary"; - const isActive = isSelected || isPrimary; + const isActive = !disabled && (isSelected || isPrimary); return (