mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-24 12:04:56 -07:00
Support ink scrolling final pr (#12567)
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2025 Google LLC
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
import type React from 'react';
|
||||
import { Box } from 'ink';
|
||||
import { theme } from '../semantic-colors.js';
|
||||
|
||||
export interface StickyHeaderProps {
|
||||
children: React.ReactNode;
|
||||
width: number;
|
||||
}
|
||||
|
||||
export const StickyHeader: React.FC<StickyHeaderProps> = ({
|
||||
children,
|
||||
width,
|
||||
}) => (
|
||||
<Box
|
||||
sticky
|
||||
minHeight={1}
|
||||
flexShrink={0}
|
||||
width={width}
|
||||
stickyChildren={
|
||||
<Box
|
||||
borderStyle="single"
|
||||
width={width}
|
||||
opaque
|
||||
borderColor={theme.ui.dark}
|
||||
borderTop={false}
|
||||
borderLeft={false}
|
||||
borderRight={false}
|
||||
paddingX={1}
|
||||
>
|
||||
{children}
|
||||
</Box>
|
||||
}
|
||||
>
|
||||
<Box paddingX={1} width={width}>
|
||||
{children}
|
||||
</Box>
|
||||
</Box>
|
||||
);
|
||||
Reference in New Issue
Block a user