forked from kriasoft/react-starter-kit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNotificationsMenu.tsx
More file actions
30 lines (26 loc) · 910 Bytes
/
NotificationsMenu.tsx
File metadata and controls
30 lines (26 loc) · 910 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* SPDX-FileCopyrightText: 2014-present Kriasoft <hello@kriasoft.com> */
/* SPDX-License-Identifier: MIT */
import { ListItemText, Menu, MenuItem, MenuProps } from "@material-ui/core";
import * as React from "react";
type NotificationsMenuProps = Omit<
MenuProps,
"id" | "role" | "open" | "anchorOrigin" | "transformOrigin"
>;
export function NotificationsMenu(props: NotificationsMenuProps): JSX.Element {
const { PaperProps, ...other } = props;
return (
<Menu
id="notifications-menu"
role="menu"
open={Boolean(props.anchorEl)}
anchorOrigin={{ vertical: "bottom", horizontal: "right" }}
transformOrigin={{ vertical: "top", horizontal: "right" }}
PaperProps={{ ...PaperProps, sx: { ...PaperProps?.sx, width: 320 } }}
{...other}
>
<MenuItem>
<ListItemText secondary="You have no notifications." />
</MenuItem>
</Menu>
);
}