Skip to content

Commit 5b613de

Browse files
fix(web): wrap full status text in composer hover details (#16158)
1 parent 039ddf1 commit 5b613de

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎apps/web/src/components/chat/ComposerBannerStack.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ function NoticeDescription({ children, compact }: { children: ReactNode; compact
306306
aria-label="Notice details"
307307
tooltipStyle
308308
side="top"
309-
className="max-w-80 whitespace-normal wrap-anywhere"
309+
className="max-w-[min(30rem,calc(100vw-2rem))] whitespace-normal wrap-anywhere [--inline-button-text-align:start] [--inline-button-white-space:normal] [&_[data-slot=inline-button]]:max-w-full"
310310
>
311311
<ComposerBanner.Scroll className="max-h-[min(var(--available-height),24rem,40dvh)]">
312312
{children}

‎apps/web/src/components/ui/button.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ function Button({ className, variant, size, render, ...props }: ButtonProps) {
101101
export { Button, buttonVariants, type ButtonSize, type ButtonVariant };
102102

103103
const inlineButtonVariants = cva(
104-
"inline-flex shrink-0 cursor-pointer items-center gap-0.5 whitespace-nowrap font-medium underline-offset-2 hover:underline focus-visible:outline-2 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-64",
104+
"inline-flex shrink-0 cursor-pointer items-center gap-0.5 font-medium underline-offset-2 [text-align:var(--inline-button-text-align,center)] [white-space:var(--inline-button-white-space,nowrap)] hover:underline focus-visible:outline-2 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-64",
105105
{
106106
defaultVariants: { tone: "default" },
107107
variants: {
@@ -117,7 +117,7 @@ const inlineButtonVariants = cva(
117117
},
118118
);
119119

120-
/** An inline text action that keeps the size of the surrounding text and underlines on hover. */
120+
/** An inline text action. Set --inline-button-white-space to normal in wrapping prose containers. */
121121
export function InlineButton({
122122
className,
123123
tone,

0 commit comments

Comments
 (0)