diff --git a/sparkle/src/components/BarHeader.tsx b/sparkle/src/components/BarHeader.tsx index 67e5f668b348..fca82183a8aa 100644 --- a/sparkle/src/components/BarHeader.tsx +++ b/sparkle/src/components/BarHeader.tsx @@ -1,5 +1,6 @@ import React from "react"; +import { Tooltip } from "@sparkle/components/Tooltip"; import { ArrowUpOnSquareIcon, ChevronLeftIcon, @@ -12,6 +13,7 @@ import { Button } from "./Button"; interface BarHeaderProps { title: string; + tooltip?: string; leftActions?: React.ReactNode; rightActions?: React.ReactNode; className?: string; @@ -19,6 +21,7 @@ interface BarHeaderProps { export function BarHeader({ title, + tooltip, leftActions, rightActions, className = "", @@ -39,7 +42,17 @@ export function BarHeader({ )} > {leftActions &&
{leftActions}
} -
{title}
+
+ {tooltip ? ( + {title}} + label={tooltip} + > + ) : ( + title + )} +
{rightActions &&
{rightActions}
} ); diff --git a/sparkle/src/stories/BarHeader.stories.tsx b/sparkle/src/stories/BarHeader.stories.tsx index c585fec47eb2..c0e3703fec19 100644 --- a/sparkle/src/stories/BarHeader.stories.tsx +++ b/sparkle/src/stories/BarHeader.stories.tsx @@ -146,6 +146,7 @@ export const BasicBarHeaderConversation = () => (
} />