migrate EmptyView to Mui 5 (#95)
This commit is contained in:
@@ -10,6 +10,7 @@ import React from 'react';
|
||||
import Typography from '@mui/material/Typography';
|
||||
import { useTheme } from '@mui/material/styles';
|
||||
import { useMediaQuery } from '@mui/material';
|
||||
import { Box } from '@mui/system';
|
||||
|
||||
const ERROR_FACES = [
|
||||
'(・o・;)',
|
||||
@@ -35,7 +36,7 @@ export default function EmptyView({ message, messageExtra }: IProps) {
|
||||
const isMobileWidth = useMediaQuery(theme.breakpoints.down('sm'));
|
||||
|
||||
return (
|
||||
<div style={{
|
||||
<Box sx={{
|
||||
position: 'absolute',
|
||||
left: `calc(50% + ${isMobileWidth ? '0px' : theme.spacing(8 / 2)})`,
|
||||
top: '50%',
|
||||
@@ -50,7 +51,7 @@ export default function EmptyView({ message, messageExtra }: IProps) {
|
||||
{message}
|
||||
</Typography>
|
||||
{messageExtra}
|
||||
</div>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user