mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
Notification alert stays on if it is an incoming call and phone is closed (#115)
* Phone now shows all the time slide a bit if incoming call exists | can close alerts! * Improve animation * Improve call controls * Make alerts not overflow | Call modal is navigable out :) * Open modal when accepting call * Cant navigate back from homepage * Avoid call route if no call active + rename things * Impprove main apps icons sizes * hover effect to app icons :) * Revert interface change * fix(phone/dialer): resolve not calling when adding contacts Co-authored-by: Christopher <[email protected]>
This commit is contained in:
1 parent
d2461bab16
commit
41674968ab
24 files changed
+396
-206
No files matched your search
@@ -0,0 +1,60 @@
|
||||
import {
|
||||
fade,
|
||||
IconButton,
|
||||
IconButtonProps,
|
||||
makeStyles,
|
||||
} from '@material-ui/core';
|
||||
import React from 'react';
|
||||
|
||||
type StatusButtonStyleColor = 'success' | 'error' | 'warning' | 'info';
|
||||
|
||||
interface IStatusButtonStyleProps {
|
||||
color: StatusButtonStyleColor;
|
||||
}
|
||||
|
||||
const useStyles = makeStyles(
|
||||
(theme) => ({
|
||||
root: {
|
||||
color: ({ color }: IStatusButtonStyleProps) =>
|
||||
theme.palette[color].contrastText,
|
||||
backgroundColor: ({ color }: IStatusButtonStyleProps) =>
|
||||
theme.palette[color].main,
|
||||
'&:hover': {
|
||||
backgroundColor: ({ color }: IStatusButtonStyleProps) =>
|
||||
theme.palette[color].light,
|
||||
},
|
||||
},
|
||||
outlined: {
|
||||
border: ({ color }: IStatusButtonStyleProps) =>
|
||||
`1px solid ${fade(theme.palette[color].main, 0.5)}`,
|
||||
'&:hover': {
|
||||
border: ({ color }: IStatusButtonStyleProps) =>
|
||||
`1px solid ${theme.palette[color].main}`,
|
||||
},
|
||||
'&$disabled': {
|
||||
border: `1px solid ${theme.palette.action.disabled}`,
|
||||
},
|
||||
},
|
||||
contained: {
|
||||
color: ({ color }: IStatusButtonStyleProps) =>
|
||||
theme.palette[color].contrastText,
|
||||
backgroundColor: ({ color }: IStatusButtonStyleProps) =>
|
||||
theme.palette[color].main,
|
||||
'&:hover': {
|
||||
backgroundColor: ({ color }: IStatusButtonStyleProps) =>
|
||||
theme.palette[color].dark,
|
||||
},
|
||||
},
|
||||
}),
|
||||
{ name: 'MuiIconButton' }
|
||||
);
|
||||
|
||||
export const StatusIconButton = ({
|
||||
color = 'info',
|
||||
size,
|
||||
className,
|
||||
...props
|
||||
}: Omit<IconButtonProps, 'color'> & { color: StatusButtonStyleColor }) => {
|
||||
const classes = useStyles({ color });
|
||||
return <IconButton className={`${classes.root} ${className}`} size={size} {...props} />;
|
||||
};
|
||||
Reference in new issue
Block a user