@@ -13,7 +13,6 @@ export interface ComposerBannerStackItem {
1313 readonly id : string ;
1414 readonly variant : ComposerBannerVariant ;
1515 readonly priority ?: "urgent" | "activity" | "notice" ;
16- readonly compact ?: boolean ;
1716 readonly icon : ReactNode ;
1817 readonly title : ReactNode ;
1918 readonly description ?: ReactNode ;
@@ -250,7 +249,7 @@ export function ComposerBannerStack({ className, items, attachedAbove }: Compose
250249}
251250
252251/** Keep full descriptions reachable only when their inline copy is clipped. */
253- function NoticeDescription ( { children, compact } : { children : ReactNode ; compact ?: boolean } ) {
252+ function NoticeDescription ( { children } : { children : ReactNode } ) {
254253 const descriptionRef = useRef < HTMLSpanElement > ( null ) ;
255254 const detailsRef = useRef < HTMLButtonElement > ( null ) ;
256255 const [ showDetails , setShowDetails ] = useState ( false ) ;
@@ -283,13 +282,10 @@ function NoticeDescription({ children, compact }: { children: ReactNode; compact
283282 } , [ ] ) ;
284283
285284 return (
286- < span className = { compact ? "contents" : "flex min-w-8 flex-1 items-center gap-1" } >
285+ < span className = "contents" >
287286 < span
288287 ref = { descriptionRef }
289- className = { cn (
290- "min-w-0 truncate text-muted-foreground" ,
291- compact && "shrink-[9999] @max-[400px]:sr-only" ,
292- ) }
288+ className = "w-0 min-w-0 grow truncate text-muted-foreground @max-[400px]:sr-only"
293289 >
294290 { children }
295291 </ span >
@@ -354,17 +350,13 @@ function ComposerBannerStackAlert({
354350 variant = { item . variant }
355351 density = "comfortable"
356352 >
357- < ComposerBanner . Row layout = { item . compact ? "wrap-actions-narrow" : "wrap-actions" } >
353+ < ComposerBanner . Row layout = "wrap-actions" >
358354 < ComposerBanner . Icon className = "h-(--composer-banner-icon-column) self-start" >
359355 { item . icon }
360356 </ ComposerBanner . Icon >
361357 < ComposerBanner . Content className = "whitespace-nowrap" >
362358 < span className = "min-w-0 truncate font-medium leading-7 sm:leading-6" > { item . title } </ span >
363- { item . description ? (
364- < NoticeDescription compact = { item . compact ?? false } >
365- { item . description }
366- </ NoticeDescription >
367- ) : null }
359+ { item . description ? < NoticeDescription > { item . description } </ NoticeDescription > : null }
368360 </ ComposerBanner . Content >
369361 { item . actions || item . onDismiss ? (
370362 < ComposerBanner . Actions >
0 commit comments