@jbrowse/core
Version:
JBrowse 2 core libraries used by plugins
19 lines (18 loc) • 1.06 kB
JavaScript
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Button, DialogActions, DialogContent, DialogContentText, } from '@mui/material';
import Dialog from "./Dialog.js";
export default function FactoryResetDialog({ onClose, open, onFactoryReset, }) {
function handleDialogClose(action) {
if (action === 'reset') {
onFactoryReset();
}
onClose();
}
return (_jsxs(Dialog, { title: "Reset", onClose: () => {
handleDialogClose();
}, open: open, children: [_jsx(DialogContent, { children: _jsx(DialogContentText, { children: "Are you sure you want to reset? This will restore the default configuration." }) }), _jsxs(DialogActions, { children: [_jsx(Button, { onClick: () => {
handleDialogClose();
}, color: "primary", children: "Cancel" }), _jsx(Button, { onClick: () => {
handleDialogClose('reset');
}, color: "primary", variant: "contained", children: "OK" })] })] }));
}