From 5dfcab609ac1dc1c8bd93c15bb84dff167cbbad8 Mon Sep 17 00:00:00 2001 From: Mark McLaughlin Date: Thu, 5 Feb 2026 11:07:19 -0800 Subject: [PATCH] refactor: remove `width` prop from Card component and add `as const` to test array. --- packages/cli/src/ui/components/shared/Card.test.tsx | 11 +++-------- packages/cli/src/ui/components/shared/Card.tsx | 1 - 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/packages/cli/src/ui/components/shared/Card.test.tsx b/packages/cli/src/ui/components/shared/Card.test.tsx index 99b1824a0f..82a15a87ee 100644 --- a/packages/cli/src/ui/components/shared/Card.test.tsx +++ b/packages/cli/src/ui/components/shared/Card.test.tsx @@ -17,6 +17,7 @@ describe('Card', () => { suffix: '0.26.0 → 0.27.0', prefix: true, body: 'Installed via Homebrew. Please update with "brew upgrade gemini-cli".', + width: 40, }, { variant: 'information', @@ -46,17 +47,11 @@ describe('Card', () => { prefix: true, body: 'Listed 39 item(s).', }, - ])( + ] as const)( 'renders a $variant card with prefix=$prefix', ({ variant, title, suffix, prefix, body }) => { const { lastFrame } = render( - + {body} , ); diff --git a/packages/cli/src/ui/components/shared/Card.tsx b/packages/cli/src/ui/components/shared/Card.tsx index 6e21079351..73262a2ee5 100644 --- a/packages/cli/src/ui/components/shared/Card.tsx +++ b/packages/cli/src/ui/components/shared/Card.tsx @@ -23,7 +23,6 @@ export interface CardProps { children?: React.ReactNode; /** The styling and intent of the card. */ variant?: 'information' | 'success' | 'warning' | 'error' | 'confirmation'; - width?: number | string; } const CardDisplay: React.FC = ({