2025-11-18 12:01:16 -05:00
|
|
|
/**
|
|
|
|
|
* @license
|
|
|
|
|
* Copyright 2025 Google LLC
|
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
import { Box, Text } from 'ink';
|
2025-11-18 20:18:18 -08:00
|
|
|
import { ThemedGradient } from './ThemedGradient.js';
|
2025-11-18 12:01:16 -05:00
|
|
|
|
|
|
|
|
interface BannerProps {
|
|
|
|
|
bannerText: string;
|
|
|
|
|
color: string;
|
|
|
|
|
width: number;
|
|
|
|
|
}
|
|
|
|
|
|
2025-11-18 20:18:18 -08:00
|
|
|
export const Banner = ({ bannerText, color, width }: BannerProps) => (
|
|
|
|
|
<Box
|
|
|
|
|
flexDirection="column"
|
|
|
|
|
borderStyle="round"
|
|
|
|
|
borderColor={color}
|
|
|
|
|
width={width}
|
|
|
|
|
paddingLeft={1}
|
|
|
|
|
paddingRight={1}
|
|
|
|
|
>
|
|
|
|
|
<ThemedGradient>
|
|
|
|
|
<Text>{bannerText}</Text>
|
|
|
|
|
</ThemedGradient>
|
|
|
|
|
</Box>
|
|
|
|
|
);
|