import type { ThemeProps } from "../../types"; import logo from "../../assets/icon.png"; import "./bento.css"; export default function BentoTheme({ config, state }: ThemeProps) { const { step, progress, installPath } = state; const { texts, primaryColor, successColor } = config; const getStatusText = () => { for (let i = texts.progressFrames.length - 1; i >= 0; i--) { if (progress <= texts.progressFrames[i].limit) return texts.progressFrames[i].text; } return texts.progressFrames[texts.progressFrames.length - 1]?.text ?? ""; }; const cssVars: React.CSSProperties = { // @ts-expect-error "--bento-primary": primaryColor, "--bento-success": successColor, }; return (
{/* Header (Top Bento Box) */}
icon
{config.appDisplayName}
{/* Dynamic Bento Grid based on step */}
{step === 1 && ( <>

{texts.welcomeTitle}

{texts.welcomeSubtitle}

v{config.appVersion} {config.appPublisher}
Destination
{installPath}
{texts.licenseAgreement}
)} {step === 2 && ( <>
{progress}%

Installing

{getStatusText()}

)} {step === 3 && ( <>

{texts.successTitle}

{texts.successSubtitle}

Highlights

{texts.features.map(f => (
{f.label}
))}
)}
); }