"use client"; interface AsciiBannerProps { helperName: string; displayName?: string; } export default function AsciiBanner({ helperName, displayName }: AsciiBannerProps) { const name = displayName || helperName; const nameUpper = name.toUpperCase(); // Create a unique minimal banner const createBanner = () => { // Dynamic sizing based on name length const minWidth = 24; const bannerWidth = Math.max(minWidth, nameUpper.length + 6); const padding = Math.floor((bannerWidth - nameUpper.length - 2) / 2); const paddedName = ' '.repeat(padding) + nameUpper + ' '.repeat(bannerWidth - nameUpper.length - padding - 2); const topBottom = '─'.repeat(bannerWidth - 2); return `┌${topBottom}┐ │${paddedName}│ └${topBottom}┘`; }; const banner = createBanner(); return (
{banner}