summaryrefslogtreecommitdiffhomepage
path: root/packages/ui/src
diff options
context:
space:
mode:
authorDavid Hill <[email protected]>2026-01-18 00:48:49 +0000
committerDavid Hill <[email protected]>2026-01-18 00:48:49 +0000
commit389d97ece9a08907c2c101ba18ae5712dfe9b8fd (patch)
treef677ac8d8843fea1e6cab24cb2029b32ac91d219 /packages/ui/src
parente36b3433fcabed407b3501f299e008173907ac9e (diff)
downloadopencode-389d97ece9a08907c2c101ba18ae5712dfe9b8fd.tar.gz
opencode-389d97ece9a08907c2c101ba18ae5712dfe9b8fd.zip
fix: adjust project path tooltip placement
Move the desktop project path tooltip above the header and tune spacing/offset; add content style hooks to Tooltip for max-width and horizontal shift.
Diffstat (limited to 'packages/ui/src')
-rw-r--r--packages/ui/src/components/tooltip.tsx11
1 files changed, 9 insertions, 2 deletions
diff --git a/packages/ui/src/components/tooltip.tsx b/packages/ui/src/components/tooltip.tsx
index c38ee5847..711047030 100644
--- a/packages/ui/src/components/tooltip.tsx
+++ b/packages/ui/src/components/tooltip.tsx
@@ -5,6 +5,8 @@ import type { ComponentProps } from "solid-js"
export interface TooltipProps extends ComponentProps<typeof KobalteTooltip> {
value: JSX.Element
class?: string
+ contentClass?: string
+ contentStyle?: JSX.CSSProperties
inactive?: boolean
}
@@ -30,7 +32,7 @@ export function TooltipKeybind(props: TooltipKeybindProps) {
export function Tooltip(props: TooltipProps) {
const [open, setOpen] = createSignal(false)
- const [local, others] = splitProps(props, ["children", "class", "inactive"])
+ const [local, others] = splitProps(props, ["children", "class", "contentClass", "contentStyle", "inactive"])
const c = children(() => local.children)
@@ -58,7 +60,12 @@ export function Tooltip(props: TooltipProps) {
{c()}
</KobalteTooltip.Trigger>
<KobalteTooltip.Portal>
- <KobalteTooltip.Content data-component="tooltip" data-placement={props.placement}>
+ <KobalteTooltip.Content
+ data-component="tooltip"
+ data-placement={props.placement}
+ class={local.contentClass}
+ style={local.contentStyle}
+ >
{others.value}
{/* <KobalteTooltip.Arrow data-slot="tooltip-arrow" /> */}
</KobalteTooltip.Content>