From a2d8d3b90ec409547c95c3166dcd233cb6d49581 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Mon, 23 Jun 2025 09:53:24 -0500 Subject: [PATCH] Add easier abstraction --- src/components/Tooltip/index.tsx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/components/Tooltip/index.tsx b/src/components/Tooltip/index.tsx index f8791ded9a..4d00eb7673 100644 --- a/src/components/Tooltip/index.tsx +++ b/src/components/Tooltip/index.tsx @@ -1,4 +1,5 @@ import { + Children, createContext, useCallback, useContext, @@ -14,6 +15,7 @@ import {atoms as a, select, useTheme} from '#/alf' import {useOnGesture} from '#/components/hooks/useOnGesture' import {Portal} from '#/components/Portal' import {TIP_SIZE} from '#/components/Tooltip/const' +import {Text} from '#/components/Typography' const HALF_TIP = TIP_SIZE / 2 const TIP_VISUAL_OFFSET = TIP_SIZE / 3 @@ -381,3 +383,18 @@ function oppposite(position: 'top' | 'bottom') { return 'center' } } + +export function TextBubble({children}: {children: React.ReactNode}) { + const c = Children.toArray(children) + return ( + + + {c.map((child, i) => ( + + {child} + + ))} + + + ) +}