File size: 6,565 Bytes
95b5a04 | 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 | import PropTypes from 'prop-types';
// material-ui
import { useTheme } from '@mui/material/styles';
import Avatar from '@mui/material/Avatar';
import Button from '@mui/material/Button';
import Card from '@mui/material/Card';
import Chip from '@mui/material/Chip';
import List from '@mui/material/List';
import ListItem from '@mui/material/ListItem';
import ListItemAvatar from '@mui/material/ListItemAvatar';
import ListItemText from '@mui/material/ListItemText';
import Stack from '@mui/material/Stack';
import Typography from '@mui/material/Typography';
import Box from '@mui/material/Box';
// project imports
import { withAlpha } from 'utils/colorUtils';
// assets
import { IconBrandTelegram, IconBuildingStore, IconMailbox, IconPhoto } from '@tabler/icons-react';
import User1 from 'assets/images/users/user-round.svg';
function ListItemWrapper({ children }) {
const theme = useTheme();
return (
<Box
sx={{
p: 2,
borderBottom: '1px solid',
borderColor: 'divider',
cursor: 'pointer',
'&:hover': {
bgcolor: withAlpha(theme.palette.grey[200], 0.3)
}
}}
>
{children}
</Box>
);
}
// ==============================|| NOTIFICATION LIST ITEM ||============================== //
export default function NotificationList() {
const containerSX = { gap: 2, pl: 7 };
return (
<List sx={{ width: '100%', maxWidth: { xs: 300, md: 330 }, py: 0 }}>
<ListItemWrapper>
<ListItem
alignItems="center"
disablePadding
secondaryAction={
<Stack direction="row" sx={{ alignItems: 'center', justifyContent: 'flex-end' }}>
<Typography variant="caption">2 min ago</Typography>
</Stack>
}
>
<ListItemAvatar>
<Avatar alt="John Doe" src={User1} />
</ListItemAvatar>
<ListItemText primary="John Doe" />
</ListItem>
<Stack sx={containerSX}>
<Typography variant="subtitle2">It is a long established fact that a reader will be distracted</Typography>
<Stack direction="row" sx={{ alignItems: 'center', gap: 1 }}>
<Chip label="Unread" color="error" size="small" sx={{ width: 'min-content' }} />
<Chip label="New" color="warning" size="small" sx={{ width: 'min-content' }} />
</Stack>
</Stack>
</ListItemWrapper>
<ListItemWrapper>
<ListItem
alignItems="center"
disablePadding
secondaryAction={
<Stack direction="row" sx={{ alignItems: 'center', justifyContent: 'flex-end' }}>
<Typography variant="caption">2 min ago</Typography>
</Stack>
}
>
<ListItemAvatar>
<Avatar
sx={{
color: 'success.dark',
bgcolor: 'success.light'
}}
>
<IconBuildingStore stroke={1.5} size="20px" />
</Avatar>
</ListItemAvatar>
<ListItemText primary={<Typography variant="subtitle1">Store Verification Done</Typography>} />
</ListItem>
<Stack sx={containerSX}>
<Typography variant="subtitle2">We have successfully received your request.</Typography>
<Chip label="Unread" color="error" size="small" sx={{ width: 'min-content' }} />
</Stack>
</ListItemWrapper>
<ListItemWrapper>
<ListItem
alignItems="center"
disablePadding
secondaryAction={
<Stack direction="row" sx={{ alignItems: 'center', justifyContent: 'flex-end' }}>
<Typography variant="caption">2 min ago</Typography>
</Stack>
}
>
<ListItemAvatar>
<Avatar
sx={{
color: 'primary.dark',
bgcolor: 'primary.light'
}}
>
<IconMailbox stroke={1.5} size="20px" />
</Avatar>
</ListItemAvatar>
<ListItemText primary={<Typography variant="subtitle1">Check Your Mail.</Typography>} />
</ListItem>
<Stack sx={containerSX}>
<Typography variant="subtitle2">All done! Now check your inbox as you're in for a sweet treat!</Typography>
<Button variant="contained" endIcon={<IconBrandTelegram stroke={1.5} size={20} />} sx={{ width: 'min-content' }}>
Mail
</Button>
</Stack>
</ListItemWrapper>
<ListItemWrapper>
<ListItem
alignItems="center"
disablePadding
secondaryAction={
<Stack direction="row" sx={{ alignItems: 'center', justifyContent: 'flex-end' }}>
<Typography variant="caption">2 min ago</Typography>
</Stack>
}
>
<ListItemAvatar>
<Avatar alt="John Doe" src={User1} />
</ListItemAvatar>
<ListItemText primary={<Typography variant="subtitle1">John Doe</Typography>} />
</ListItem>
<Stack sx={containerSX}>
<Typography component="span" variant="subtitle2">
Uploaded two file on
<Typography component="span" variant="h6">
21 Jan 2020
</Typography>
</Typography>
<Card sx={{ bgcolor: 'secondary.light' }}>
<Stack direction="row" sx={{ p: 2.5, gap: 2 }}>
<IconPhoto stroke={1.5} size="20px" />
<Typography variant="subtitle1">demo.jpg</Typography>
</Stack>
</Card>
</Stack>
</ListItemWrapper>
<ListItemWrapper>
<ListItem
alignItems="center"
disablePadding
secondaryAction={
<Stack direction="row" sx={{ alignItems: 'center', justifyContent: 'flex-end' }}>
<Typography variant="caption">2 min ago</Typography>
</Stack>
}
>
<ListItemAvatar>
<Avatar alt="John Doe" src={User1} />
</ListItemAvatar>
<ListItemText primary={<Typography variant="subtitle1">John Doe</Typography>} />
</ListItem>
<Stack sx={containerSX}>
<Typography variant="subtitle2">It is a long established fact that a reader will be distracted</Typography>
<Chip label="Confirmation of Account." color="success" size="small" sx={{ width: 'min-content' }} />
</Stack>
</ListItemWrapper>
</List>
);
}
ListItemWrapper.propTypes = { children: PropTypes.node };
|