diff --git a/src/app/components/both-menu/BothMenu.tsx b/src/app/components/both-menu/BothMenu.tsx index 0d6f237..7d8dffe 100644 --- a/src/app/components/both-menu/BothMenu.tsx +++ b/src/app/components/both-menu/BothMenu.tsx @@ -10,6 +10,7 @@ import {NavLink} from 'react-router-dom'; import {ROUTES} from '_consts/common'; import ToggleMenu from '../toggle-menu'; import {BOTH_MENU_LINKS} from '../../consts'; +import PopupList from '../popup-list/PopupList'; const useStyles = makeStyles((theme: Theme) => createStyles({ @@ -31,6 +32,9 @@ const useStyles = makeStyles((theme: Theme) => right: 0, margin: '0 auto', }, + addButton: { + paddingTop: '5px' + }, }), ); @@ -70,7 +74,9 @@ const BothMenu: React.FC = ({trigger}) => { color="secondary" className={classes.fabButton} > - + + +
; + +const PopupList: React.FC = ({children}) => { + const [open, setOpen] = React.useState(false); + + const handleClickOpen = useCallback(() => { + setOpen(true); + }, [setOpen]); + + const handleClose = useCallback(() => { + setOpen(false); + }, [setOpen]); + + return ( + + + + {MENU_ADDS.map(item => ( + + + + ))} + + +
+ {children} +
+
+ ); +}; + +export default memo(PopupList); diff --git a/src/app/components/popup-list/index.ts b/src/app/components/popup-list/index.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/app/consts.ts b/src/app/consts.ts index 35770a4..5d763fb 100644 --- a/src/app/consts.ts +++ b/src/app/consts.ts @@ -2,6 +2,9 @@ import {ROUTES} from '_consts/common'; export const LABELS = { SEACRH: 'Поиск', + ADD_TASK: 'Добавить задачу', + ADD_FOLDER: 'Добавить папку', + ADD_TAG: 'Добавить тег', } as const; export const BOTH_MENU_LINKS = [ @@ -18,3 +21,5 @@ export const BOTH_MENU_LINKS = [ url: ROUTES.INFORMATION } ]; + +export const MENU_ADDS = [LABELS.ADD_TASK, LABELS.ADD_FOLDER, LABELS.ADD_TAG];