Files
new-phone-who-dis/phone/src/ui/components/ContextMenu.tsx
T
Taso 954ef6277c styling(misc): Misc. Tweaks and gen styling changes
General Phone:
- Removed unecessary border that was causing an issue at 80% zoom
- Added tooltips to the app grid
- Added 4 new backgrounds

Contact App:
- Fix styling issue that lead to seeing the background from modal
- Fix add new contact button sticky position

Notes:
- Removed padding from list
- Fixed localeName

Sellout:
- Changed NavBar and Title Color

Settings:
- Removed modal list padding

Note: Let me if you prefer the AppTitle component vs the old Title method
also this is just a start to the full app restyles
2020-11-18 23:32:49 -05:00

46 lines
1.1 KiB
TypeScript

import React from 'react';
import {
ListItemIcon,
ListItemText,
Slide,
makeStyles,
Paper,
} from '@material-ui/core';
import { List } from './List';
import { ListItem } from './ListItem';
const useStyles = makeStyles((theme) => ({
root: {
width: '100%',
position: 'absolute',
bottom: 0,
zIndex: 2,
},
}));
export const ContextMenu = ({ open, onClose, options }) => {
const classes = useStyles();
return (
<Slide direction='up' in={open} mountOnEnter unmountOnExit>
<Paper square className={classes.root}>
<List disablePadding>
{options.map((option) => (
<ListItem
selected={option.selected}
key={option.key || option.label}
button
onClick={(e) => {
option.onClick(e, option);
onClose();
}}
>
{option.icon && <ListItemIcon>{option.icon}</ListItemIcon>}
<ListItemText primary={option.label} />
</ListItem>
))}
</List>
</Paper>
</Slide>
);
};