2025-04-18 17:44:24 -07:00
|
|
|
/**
|
|
|
|
|
* @license
|
|
|
|
|
* Copyright 2025 Google LLC
|
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
*/
|
|
|
|
|
|
2025-04-15 21:41:08 -07:00
|
|
|
import React from 'react';
|
2025-06-05 00:00:34 -07:00
|
|
|
import { Box, Text } from 'ink';
|
2025-04-19 12:38:09 -04:00
|
|
|
import Gradient from 'ink-gradient';
|
2025-04-24 11:56:23 -07:00
|
|
|
import { Colors } from '../colors.js';
|
2025-04-15 21:41:08 -07:00
|
|
|
|
2025-06-05 00:00:34 -07:00
|
|
|
const asciiArtLogo = `
|
|
|
|
|
██████╗ ███████╗███╗ ███╗██╗███╗ ██╗██╗
|
|
|
|
|
██╔════╝ ██╔════╝████╗ ████║██║████╗ ██║██║
|
|
|
|
|
██║ ███╗█████╗ ██╔████╔██║██║██╔██╗ ██║██║
|
|
|
|
|
██║ ██║██╔══╝ ██║╚██╔╝██║██║██║╚██╗██║██║
|
|
|
|
|
╚██████╔╝███████╗██║ ╚═╝ ██║██║██║ ╚████║██║
|
|
|
|
|
╚═════╝ ╚══════╝╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝╚═╝
|
|
|
|
|
`;
|
2025-06-02 17:09:55 -07:00
|
|
|
|
2025-06-05 18:14:02 -07:00
|
|
|
interface HeaderProps {
|
|
|
|
|
title?: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export const Header: React.FC<HeaderProps> = ({ title = asciiArtLogo }) => (
|
2025-04-24 11:56:23 -07:00
|
|
|
<>
|
2025-06-05 00:00:34 -07:00
|
|
|
<Box marginBottom={1} alignItems="flex-start">
|
2025-04-24 11:56:23 -07:00
|
|
|
{Colors.GradientColors ? (
|
|
|
|
|
<Gradient colors={Colors.GradientColors}>
|
2025-06-05 18:14:02 -07:00
|
|
|
<Text>{title}</Text>
|
2025-04-24 11:56:23 -07:00
|
|
|
</Gradient>
|
|
|
|
|
) : (
|
2025-06-05 18:14:02 -07:00
|
|
|
<Text>{title}</Text>
|
2025-04-24 11:56:23 -07:00
|
|
|
)}
|
2025-04-18 18:08:43 -04:00
|
|
|
</Box>
|
|
|
|
|
</>
|
|
|
|
|
);
|