refactor: formatting and some other stuff

This commit is contained in:
thecodrr
2020-04-21 12:00:06 +05:00
parent 1807afaa0f
commit 84ba34955d
3 changed files with 6 additions and 4 deletions

View File

@@ -10,19 +10,21 @@ function Confirm(props) {
icon={props.icon}
positiveButton={{
text: "Yes",
onClick: props.onYes
onClick: props.onYes,
}}
negativeButton={{ text: "No", onClick: props.onNo }}
>
<Box my={1}>
<Text textAlign="center">{props.message}</Text>
<Text textAlign="center" variant="body">
{props.message}
</Text>
</Box>
</Dialog>
);
}
export function confirm(icon, title, message) {
return showDialog(perform => (
return showDialog((perform) => (
<Confirm
title={title}
message={message}

View File

@@ -11,6 +11,7 @@ function Home() {
useEffect(() => store.refresh(), []);
const notes = useStore((store) => store.notes);
const newSession = useEditorStore((store) => store.newSession);
return (
<ListContainer
items={notes.items}

View File

@@ -1,5 +1,4 @@
import React, { useState, useEffect } from "react";
import { db } from "../common";
import Notebook from "../components/notebook";
import AddNotebookDialog from "../components/dialogs/addnotebookdialog";
import ListContainer from "../components/list-container";