-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dark theme, alert, better adding tasks by keys
- Loading branch information
Showing
13 changed files
with
285 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import React from "react"; | ||
import Button from "@material-ui/core/Button"; | ||
import Dialog from "@material-ui/core/Dialog"; | ||
import DialogActions from "@material-ui/core/DialogActions"; | ||
import DialogContent from "@material-ui/core/DialogContent"; | ||
import DialogContentText from "@material-ui/core/DialogContentText"; | ||
import DialogTitle from "@material-ui/core/DialogTitle"; | ||
|
||
export default function AlertDialog({ | ||
question, | ||
text, | ||
open, | ||
handleSuccess, | ||
handleFail | ||
}) { | ||
return ( | ||
<Dialog | ||
open={open} | ||
onClose={null} | ||
aria-labelledby="alert-dialog-title" | ||
aria-describedby="alert-dialog-description" | ||
> | ||
<DialogTitle id="alert-dialog-title">{question}</DialogTitle> | ||
<DialogContent> | ||
<DialogContentText id="alert-dialog-description"> | ||
{text} | ||
</DialogContentText> | ||
</DialogContent> | ||
<DialogActions> | ||
<Button onClick={handleFail} color="primary"> | ||
No | ||
</Button> | ||
<Button onClick={handleSuccess} color="primary" autoFocus> | ||
Yes | ||
</Button> | ||
</DialogActions> | ||
</Dialog> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import React from "react"; | ||
import Dialog from "@material-ui/core/Dialog"; | ||
import DialogActions from "@material-ui/core/DialogActions"; | ||
import DialogTitle from "@material-ui/core/DialogTitle"; | ||
import Button from "@material-ui/core/Button"; | ||
import SetFolder from "./Folder/SetFolder"; | ||
|
||
function AddFolderDialog({ | ||
classes, | ||
open, | ||
setOpen, | ||
curHeadline, | ||
setCurHeadline, | ||
curDescription, | ||
setCurDescription, | ||
errorHead, | ||
errorDesc, | ||
setErrorHead, | ||
setErrorDesc, | ||
handleAddButton | ||
}) { | ||
return ( | ||
<Dialog | ||
className={classes.addFolderDialog} | ||
open={open} | ||
onClose={() => setOpen(false)} | ||
aria-labelledby="form-dialog-folders" | ||
> | ||
<DialogTitle id="form-dialog-folders">Add new folder</DialogTitle> | ||
<SetFolder | ||
curHeadline={curHeadline} | ||
setCurHeadline={setCurHeadline} | ||
curDescription={curDescription} | ||
setCurDescription={setCurDescription} | ||
errorHead={errorHead} | ||
errorDesc={errorDesc} | ||
setErrorHead={setErrorHead} | ||
setErrorDesc={setErrorDesc} | ||
/> | ||
<DialogActions> | ||
<Button onClick={() => setOpen(false)} color="secondary"> | ||
Cancel | ||
</Button> | ||
<Button onClick={handleAddButton} color="primary"> | ||
Add | ||
</Button> | ||
</DialogActions> | ||
</Dialog> | ||
); | ||
} | ||
|
||
export default AddFolderDialog; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.