caverav / auditforge

AuditForge is a pentest reporting application making it simple and easy to write your findings and generate a customizable report.
https://auditforge.feriadesoftware.cl
MIT License
1 stars 0 forks source link

Agrega componente toast #7

Closed jllanosg closed 1 month ago

jllanosg commented 1 month ago

Agrega componente genérico Toast

How to test

const [showToast, setShowToast] = useState(false);

  const handleShowToast = () => {
    setShowToast(true);
    setTimeout(() => setShowToast(false), 3000); // Ocultar el toast después de 3 segundos
  };

  return (
    <div className="p-4">
      <button onClick={handleShowToast} className="bg-blue-500 text-white px-4 py-2 rounded">
        Show Toast
      </button>
      {showToast && (
        <Toast message="This is a toast message!" type="success" onClose={() => setShowToast(false)} />
      )}
    </div>
  );

Acknowledgements