Skip to content

Commit

Permalink
Icons to scratchpad buttons.
Browse files Browse the repository at this point in the history
  • Loading branch information
soup-bowl committed Nov 26, 2023
1 parent 3235618 commit a02c51c
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions src/pages/scratchpad.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import { useEffect, useState } from "react";
import { Alert, AlertTitle, Box, Button, Menu, MenuItem, Stack, Typography } from "@mui/material";
import AddIcon from '@mui/icons-material/Add';
import { Alert, AlertTitle, Box, Button, ListItemIcon, ListItemText, Menu, MenuItem, Stack, Typography } from "@mui/material";
import { Scratches } from "../components";
import { ScratchEditorModal } from "../modals";
import { addScratch, createItem, getScratches, removeScratch, saveScratches, updateScratch } from "../utils/scratch";
import { IScratchpadItem } from "../interfaces";

import AddIcon from '@mui/icons-material/Add';
import MoreVertIcon from '@mui/icons-material/MoreVert';
import DownloadIcon from '@mui/icons-material/Download';
import UploadIcon from '@mui/icons-material/Upload';

const siteTitle = "Scratchpad";

const ScratchpadPage = () => {
Expand Down Expand Up @@ -117,6 +121,7 @@ const ScratchpadPage = () => {
id="scratch-option-button"
color="secondary"
variant="contained"
startIcon={<MoreVertIcon />}
aria-controls={openMenuDialog ? 'scratch-option-menu' : undefined}
aria-haspopup="true"
aria-expanded={openMenuDialog ? 'true' : undefined}
Expand Down Expand Up @@ -149,8 +154,18 @@ const ScratchpadPage = () => {
onClose={handleCloseMenu}
MenuListProps={{ 'aria-labelledby': 'scratch-option-button' }}
>
<MenuItem onClick={handleImport}>Import Scratches</MenuItem>
<MenuItem onClick={handleExport}>Export Scratches</MenuItem>
<MenuItem onClick={handleImport}>
<ListItemIcon>
<DownloadIcon fontSize="small" />
</ListItemIcon>
<ListItemText>Import Scratches</ListItemText>
</MenuItem>
<MenuItem onClick={handleExport}>
<ListItemIcon>
<UploadIcon fontSize="small" />
</ListItemIcon>
<ListItemText>Export Scratches</ListItemText>
</MenuItem>
</Menu>
</>
);
Expand Down

0 comments on commit a02c51c

Please sign in to comment.