import React, {ComponentProps, FC} from "react"; import {Note} from "./tree/cards"; import {motion} from "framer-motion"; import classNames from "classnames"; export type ToolTipProps = Note & { icon?: React.ReactNode width?: 'fixed' | 'full', style?: 'light', background?: 'normal' | 'lighter', titleAndContentGap?: 'narrower' | 'longer', mainContentAlignment?: 'edge' | 'title' mainContentTextColor?: ComponentProps<'div'>['className'] animationDirection?: 'left-to-right' | 'bottom-to-top', animate?: boolean } export const ToolTip: FC = ({ title, content, width = 'fixed', background = 'normal', mainContentAlignment = 'edge', mainContentTextColor = 'text-gray-700', titleAndContentGap = 'longer', animationDirection = 'left-to-right', animate = true, style }) => { const targetAxis = animationDirection === 'left-to-right' ? 'x' : 'y'; if (!content || !content.length || !content.filter(c => !!c).length) { return null; } return
{title &&
{title}
}
{content?.map(content =>

{content}

)}
}