import { Tooltip as KobalteTooltip } from "@kobalte/core/tooltip" import { createSignal, Match, splitProps, Switch, type JSX } from "solid-js" import type { ComponentProps } from "solid-js" export interface TooltipProps extends ComponentProps { value: JSX.Element class?: string contentClass?: string contentStyle?: JSX.CSSProperties inactive?: boolean forceOpen?: boolean } export interface TooltipKeybindProps extends Omit { title: string keybind: string } export function TooltipKeybind(props: TooltipKeybindProps) { const [local, others] = splitProps(props, ["title", "keybind"]) return ( {local.title} {local.keybind} } /> ) } export function Tooltip(props: TooltipProps) { const [open, setOpen] = createSignal(false) const [local, others] = splitProps(props, [ "children", "class", "contentClass", "contentStyle", "inactive", "forceOpen", "value", ]) return ( {local.children} {local.children} {local.value} {/* */} ) }