Skip to content

Commit

Permalink
fix: modal title overflow tooltip
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <i@innei.in>
  • Loading branch information
Innei committed Sep 30, 2024
1 parent 6f94ec5 commit 5146dd2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions apps/renderer/src/components/ui/modal/stacked/modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import { cn } from "~/lib/utils"

import { Divider } from "../../divider"
import { RootPortalProvider } from "../../portal/provider"
import { EllipsisHorizontalTextWithTooltip } from "../../typography"
import { modalStackAtom } from "./atom"
import { MODAL_STACK_Z_INDEX, modalMontionConfig } from "./constants"
import type { CurrentModalContentProps, ModalActionsInternal } from "./context"
Expand Down Expand Up @@ -359,9 +360,11 @@ export const ModalInternal = memo(
onPointerDownCapture={handleDrag}
onPointerDown={handleResizeEnable}
>
<Dialog.Title className="flex max-w-full shrink-0 grow items-center gap-2 px-4 py-1 text-lg font-semibold">
<Dialog.Title className="flex w-0 max-w-full grow items-center gap-2 px-4 py-1 text-lg font-semibold">
{icon && <span className="size-4">{icon}</span>}
<span className="truncate">{title}</span>
<EllipsisHorizontalTextWithTooltip className="truncate">
<span>{title}</span>
</EllipsisHorizontalTextWithTooltip>
</Dialog.Title>
{canClose && (
<Dialog.DialogClose className="center p-2" tabIndex={1} onClick={close}>
Expand Down

0 comments on commit 5146dd2

Please sign in to comment.