mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-27 13:34:15 -07:00
refactor: remove width prop from Card component and add as const to test array.
This commit is contained in:
@@ -17,6 +17,7 @@ describe('Card', () => {
|
|||||||
suffix: '0.26.0 → 0.27.0',
|
suffix: '0.26.0 → 0.27.0',
|
||||||
prefix: true,
|
prefix: true,
|
||||||
body: 'Installed via Homebrew. Please update with "brew upgrade gemini-cli".',
|
body: 'Installed via Homebrew. Please update with "brew upgrade gemini-cli".',
|
||||||
|
width: 40,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
variant: 'information',
|
variant: 'information',
|
||||||
@@ -46,17 +47,11 @@ describe('Card', () => {
|
|||||||
prefix: true,
|
prefix: true,
|
||||||
body: 'Listed 39 item(s).',
|
body: 'Listed 39 item(s).',
|
||||||
},
|
},
|
||||||
])(
|
] as const)(
|
||||||
'renders a $variant card with prefix=$prefix',
|
'renders a $variant card with prefix=$prefix',
|
||||||
({ variant, title, suffix, prefix, body }) => {
|
({ variant, title, suffix, prefix, body }) => {
|
||||||
const { lastFrame } = render(
|
const { lastFrame } = render(
|
||||||
<Card
|
<Card variant={variant} title={title} suffix={suffix} prefix={prefix}>
|
||||||
variant={variant}
|
|
||||||
title={title}
|
|
||||||
suffix={suffix}
|
|
||||||
prefix={prefix}
|
|
||||||
width={80}
|
|
||||||
>
|
|
||||||
<Text>{body}</Text>
|
<Text>{body}</Text>
|
||||||
</Card>,
|
</Card>,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ export interface CardProps {
|
|||||||
children?: React.ReactNode;
|
children?: React.ReactNode;
|
||||||
/** The styling and intent of the card. */
|
/** The styling and intent of the card. */
|
||||||
variant?: 'information' | 'success' | 'warning' | 'error' | 'confirmation';
|
variant?: 'information' | 'success' | 'warning' | 'error' | 'confirmation';
|
||||||
width?: number | string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const CardDisplay: React.FC<CardProps> = ({
|
const CardDisplay: React.FC<CardProps> = ({
|
||||||
|
|||||||
Reference in New Issue
Block a user