Fix: Animated scrollbar renders black in NO_COLOR mode (#13188)

This commit is contained in:
Jacob Richman
2025-11-16 20:45:07 -08:00
committed by GitHub
parent cf8de02c68
commit 78a28bfc01
9 changed files with 202 additions and 44 deletions
+2 -23
View File
@@ -5,9 +5,8 @@
*/
import type React from 'react';
import { Box, Text } from 'ink';
import Gradient from 'ink-gradient';
import { theme } from '../semantic-colors.js';
import { Box } from 'ink';
import { ThemedGradient } from './ThemedGradient.js';
import {
shortAsciiLogo,
longAsciiLogo,
@@ -26,26 +25,6 @@ interface HeaderProps {
nightly: boolean;
}
const ThemedGradient: React.FC<{ children: React.ReactNode }> = ({
children,
}) => {
const gradient = theme.ui.gradient;
if (gradient && gradient.length >= 2) {
return (
<Gradient colors={gradient}>
<Text>{children}</Text>
</Gradient>
);
}
if (gradient && gradient.length === 1) {
return <Text color={gradient[0]}>{children}</Text>;
}
return <Text>{children}</Text>;
};
export const Header: React.FC<HeaderProps> = ({
customAsciiArt,
version,