feat: Show snowfall animation for holiday theme (#15494)

Co-authored-by: Jack Wotherspoon <jackwoth@google.com>
This commit is contained in:
Sehoon Shon
2025-12-26 11:07:39 -05:00
committed by GitHub
parent 56b050422d
commit 9cdb267ba5
5 changed files with 284 additions and 2 deletions

View File

@@ -18,6 +18,7 @@ import {
import { getAsciiArtWidth } from '../utils/textUtils.js';
import { useTerminalSize } from '../hooks/useTerminalSize.js';
import { getTerminalProgram } from '../utils/terminalSetup.js';
import { useSnowfall } from '../hooks/useSnowfall.js';
interface HeaderProps {
customAsciiArt?: string; // For user-defined ASCII art
@@ -47,6 +48,7 @@ export const Header: React.FC<HeaderProps> = ({
}
const artWidth = getAsciiArtWidth(displayTitle);
const title = useSnowfall(displayTitle);
return (
<Box
@@ -55,7 +57,7 @@ export const Header: React.FC<HeaderProps> = ({
flexShrink={0}
flexDirection="column"
>
<ThemedGradient>{displayTitle}</ThemedGradient>
<ThemedGradient>{title}</ThemedGradient>
{nightly && (
<Box width="100%" flexDirection="row" justifyContent="flex-end">
<ThemedGradient>v{version}</ThemedGradient>