mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-06-21 00:37:17 -07:00
dbe94ad43c
- This utilizes `ink-gradient` to render GEMINI CODE in amazing colors. - Added a shared color configuration for UX (should this be in config?). It's very possible that we shouldn't be talking about the specific colors and instead be mentioning "foreground"/"background"/inlineCode etc. type colors. - Updated existing color usages to utilize `Colors.*` Fixes https://b.corp.google.com/issues/411385593
32 lines
660 B
TypeScript
32 lines
660 B
TypeScript
/**
|
|
* @license
|
|
* Copyright 2025 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
import React from 'react';
|
|
import { Text, Box } from 'ink';
|
|
import { Colors } from '../../colors.js';
|
|
|
|
interface ErrorMessageProps {
|
|
text: string;
|
|
}
|
|
|
|
export const ErrorMessage: React.FC<ErrorMessageProps> = ({ text }) => {
|
|
const prefix = '✕ ';
|
|
const prefixWidth = prefix.length;
|
|
|
|
return (
|
|
<Box flexDirection="row">
|
|
<Box width={prefixWidth}>
|
|
<Text color={Colors.AccentRed}>{prefix}</Text>
|
|
</Box>
|
|
<Box flexGrow={1}>
|
|
<Text wrap="wrap" color={Colors.AccentRed}>
|
|
{text}
|
|
</Text>
|
|
</Box>
|
|
</Box>
|
|
);
|
|
};
|