2026-02-06 11:33:39 -08:00
|
|
|
/**
|
|
|
|
|
* @license
|
|
|
|
|
* Copyright 2025 Google LLC
|
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
import type React from 'react';
|
2026-02-06 22:35:14 -08:00
|
|
|
import { Box, Text } from 'ink';
|
2026-02-06 11:33:39 -08:00
|
|
|
import { theme } from '../../semantic-colors.js';
|
|
|
|
|
|
2026-02-06 22:35:14 -08:00
|
|
|
export const SectionHeader: React.FC<{ title: string }> = ({ title }) => (
|
|
|
|
|
<Box width="100%" flexDirection="row" overflow="hidden">
|
|
|
|
|
<Text color={theme.text.secondary} wrap="truncate-end">
|
|
|
|
|
{`── ${title}`}
|
|
|
|
|
</Text>
|
|
|
|
|
<Box
|
|
|
|
|
flexGrow={1}
|
|
|
|
|
flexShrink={0}
|
|
|
|
|
minWidth={2}
|
|
|
|
|
marginLeft={1}
|
|
|
|
|
borderStyle="single"
|
|
|
|
|
borderTop
|
|
|
|
|
borderBottom={false}
|
|
|
|
|
borderLeft={false}
|
|
|
|
|
borderRight={false}
|
|
|
|
|
borderColor={theme.text.secondary}
|
|
|
|
|
/>
|
|
|
|
|
</Box>
|
|
|
|
|
);
|