- Agrega permiso de menu para vania.barrios@tagumedica.com - Renombra test/ a tools/ (colecciones de requests SAP/ApiGateway) - Renombra vistas de frontend con sufijo View para consistencia - Refactor de componentes UI compartidos y agrega utilidades (Icon, PageLoader, SecondaryButton, FieldTooltip, errors)
25 lines
964 B
TypeScript
25 lines
964 B
TypeScript
interface FieldTooltipProps {
|
|
text?: string;
|
|
}
|
|
|
|
export default function FieldTooltip({ text }: FieldTooltipProps) {
|
|
if (!text) return null;
|
|
|
|
return (
|
|
<span className="relative inline-flex group align-middle ml-1">
|
|
<span
|
|
tabIndex={0}
|
|
className="inline-flex items-center justify-center w-3.5 h-3.5 rounded-full border border-[var(--color-border)] text-[var(--color-text-muted)] text-[9px] leading-none font-semibold cursor-help select-none"
|
|
>
|
|
i
|
|
</span>
|
|
<span
|
|
role="tooltip"
|
|
className="pointer-events-none absolute left-1/2 bottom-full z-20 mb-1 -translate-x-1/2 whitespace-nowrap border border-[var(--color-border)] bg-[var(--color-surface)] px-2 py-1 text-[11px] font-normal normal-case text-[var(--color-text)] opacity-0 invisible group-hover:visible group-hover:opacity-100 group-focus-within:visible group-focus-within:opacity-100"
|
|
>
|
|
{text}
|
|
</span>
|
|
</span>
|
|
);
|
|
}
|