Files
dify/web/app/components/base/tooltip/content.tsx
Stephen Zhou 36e840cd87 chore: knip fix (#34481)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-02 15:03:42 +00:00

23 lines
710 B
TypeScript

import type { FC, PropsWithChildren, ReactNode } from 'react'
type ToolTipContentProps = {
title?: ReactNode
action?: ReactNode
} & PropsWithChildren
export const ToolTipContent: FC<ToolTipContentProps> = ({
title,
action,
children,
}) => {
return (
<div className="w-[180px]" data-testid="tooltip-content">
{!!title && (
<div className="mb-1.5 font-semibold text-text-secondary" data-testid="tooltip-content-title">{title}</div>
)}
<div className="mb-1.5 text-text-tertiary" data-testid="tooltip-content-body">{children}</div>
{!!action && <div className="cursor-pointer text-text-accent" data-testid="tooltip-content-action">{action}</div>}
</div>
)
}