1d22adc42e
Backend (Express + MariaDB) y frontend (React + Vite, identidad Fluent/Windows) con el nucleo funcional: seguridad, organizacion, proyectos, actividades, subtareas, dependencias, dashboard, calendario, gantt, comentarios, adjuntos, notificaciones in-app y catalogos. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
22 lines
669 B
React
22 lines
669 B
React
import { useState } from 'react';
|
|
import { Info, CheckCircle2, AlertTriangle, XCircle, X } from 'lucide-react';
|
|
|
|
const ICONS = { info: Info, success: CheckCircle2, warning: AlertTriangle, error: XCircle };
|
|
|
|
export function InfoBar({ tone = 'info', children, dismissible = true }) {
|
|
const [visible, setVisible] = useState(true);
|
|
if (!visible) return null;
|
|
const Icon = ICONS[tone] || Info;
|
|
return (
|
|
<div className={`infobar infobar-${tone}`}>
|
|
<Icon />
|
|
<div>{children}</div>
|
|
{dismissible && (
|
|
<button className="infobar-close" onClick={() => setVisible(false)}>
|
|
<X size={14} />
|
|
</button>
|
|
)}
|
|
</div>
|
|
);
|
|
}
|