Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

ui: add cancel button to export dialog

thecodrr7bb5d47ff6a1
diff --git a/apps/web/src/components/dialogs/exportdialog.js b/apps/web/src/components/dialogs/exportdialog.js
index 5a3294abd..58915a911 100644
--- a/apps/web/src/components/dialogs/exportdialog.js
+++ b/apps/web/src/components/dialogs/exportdialog.js
@@ -7,7 +7,12 @@ import Dialog, { showDialog } from "./dialog";
function ExportDialog(props) {
return (
- <Dialog isOpen={true} title={props.title} icon={props.icon}>
+ <Dialog
+ isOpen={true}
+ title={props.title}
+ icon={props.icon}
+ negativeButton={{ onClick: props.onClose, text: "Cancel" }}
+ >
<Box>
<Text variant="body" mb={2}>
Please choose a format to export the note into:
@@ -47,6 +52,7 @@ export function showExportDialog(note) {
<ExportDialog
title={"Export Note"}
icon={Icon.Export}
+ onClose={() => perform(false)}
exportNote={async (format) => {
const content = await db.notes.note(note.id).export(format);
download(note.title, content, format);