From 335d83365521728181248b13a55386a10ae41ef0 Mon Sep 17 00:00:00 2001 From: Adam <2363879+adamdotdevin@users.noreply.github.com> Date: Fri, 17 Oct 2025 15:22:08 -0500 Subject: wip: desktop work --- packages/ui/src/components/list.tsx | 2 ++ packages/ui/src/components/tooltip.tsx | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'packages/ui/src/components') diff --git a/packages/ui/src/components/list.tsx b/packages/ui/src/components/list.tsx index 9704e4554..8bfbbdc98 100644 --- a/packages/ui/src/components/list.tsx +++ b/packages/ui/src/components/list.tsx @@ -9,6 +9,7 @@ export interface ListProps { key: (x: T) => string current?: T onSelect?: (value: T | undefined) => void + onHover?: (value: T | undefined) => void class?: ComponentProps<"div">["class"] } @@ -45,6 +46,7 @@ export function List(props: ListProps) { createEffect(() => { if (store.mouseActive || props.data.length === 0) return const index = props.data.findIndex((x) => props.key(x) === list.active()) + props.onHover?.(props.data[index]) if (index === 0) { virtualizer()?.scrollTo(0) return diff --git a/packages/ui/src/components/tooltip.tsx b/packages/ui/src/components/tooltip.tsx index b975099fb..14e433e21 100644 --- a/packages/ui/src/components/tooltip.tsx +++ b/packages/ui/src/components/tooltip.tsx @@ -30,11 +30,11 @@ export function Tooltip(props: TooltipProps) { return ( - + {c()} - + {typeof others.value === "function" ? others.value() : others.value} {/* */} -- cgit v1.2.3