import type { ReactNode } from "react"; import { useI18n } from "@arronqzy/i18n/react"; import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, } from "@arronqzy/ui"; export type ConfigHintIconProps = { label?: string; children: ReactNode; className?: string; contentClassName?: string; }; export function ConfigHintIcon({ label, children, className, contentClassName, }: ConfigHintIconProps) { const { t } = useI18n(); const resolvedLabel = label ?? t("common.hint"); return ( {children} ); } export function ConfigSectionTitle({ title, hint, }: { title: string; hint: ReactNode; }) { return (
{title}
{hint}
); } export function ConfigFieldLabel({ label, hint, }: { label: string; hint?: ReactNode; }) { if (!hint) { return {label}; } return ( {label} {hint} ); }