Notify user of buffer errors from vtk / add possibility to add actions to notifications

This commit is contained in:
igoroctaviano committed 2021-01-20 18:05:20 -03:00
1 parent efde6ed20e
commit f07f21117d
6 files changed
+132 -53

No files matched your search

@@ -1,4 +1,4 @@
import React, { useState, useEffect } from 'react';
import React, { useEffect } from 'react';
const SnackbarItem = ({ options, onClose }) => {
const handleClose = () => {
@@ -24,6 +24,11 @@ const SnackbarItem = ({ options, onClose }) => {
</span>
{options.title && <div className="sb-title">{options.title}</div>}
{options.message && <div className="sb-message">{options.message}</div>}
{options.action && (
<button className="sb-action" onClick={options.action.onClick}>
{options.action.label}
</button>
)}
</div>
);
};