feat(Phone): add animation

This commit is contained in:
Christopher committed 2021-02-15 00:30:01 +01:00
1 parent e51bcca7f8
commit 31e692626a
1 file changed
+4 -4
+4 -4
View File
@@ -5,7 +5,7 @@ import { Route } from 'react-router-dom';
import { CallModal } from './modal/components/CallModal';
import { Alert } from './ui/components/Alert';
import { HomeApp } from './apps/home/components/Home';
import { createMuiTheme, ThemeProvider } from '@material-ui/core';
import { createMuiTheme, ThemeProvider, Slide} from '@material-ui/core';
import { useInitKeyboard } from './os/keyboard/hooks/useKeyboard';
import { NotificationIcon } from './os/notifications/components/NotificationIcon';
import { NotificationBar } from './os/notifications/components/NotificationBar';
@@ -66,9 +66,7 @@ function Phone() {
[settings.theme]
);
if (visibility === false) {
return null;
}
document.onkeyup = function (data) {
if (data.which === 27) {
Nui.send('phone:close');
@@ -77,6 +75,7 @@ function Phone() {
return (
<ThemeProvider theme={currentTheme}>
<Slide direction='up' in={visibility} mountOnEnter unmountOnExit>
<div className='PhoneWrapper'>
<div>
<div
@@ -141,6 +140,7 @@ function Phone() {
</div>
</div>
</div>
</Slide>
</ThemeProvider>
);
}