Fix EmptyView styling

This commit is contained in:
schroda
2024-04-29 16:21:43 +02:00
parent 93e95c0a8f
commit 0f16429c14
2 changed files with 14 additions and 1 deletions

View File

@@ -40,6 +40,7 @@ export function EmptyView({ message, messageExtra, retry, noFaces, sx }: EmptyVi
sx={{
textAlign: 'center',
alignItems: 'center',
justifyContent: 'center',
height: '100%',
...sx,
}}

View File

@@ -9,7 +9,19 @@
import { EmptyView, EmptyViewProps } from '@/components/util/EmptyView.tsx';
export function EmptyViewAbsoluteCentered({ sx, ...emptyViewProps }: EmptyViewProps) {
return <EmptyView {...emptyViewProps} sx={{ position: 'absolute', width: '100%', height: '100%', ...sx }} />;
return (
<EmptyView
{...emptyViewProps}
sx={{
position: 'absolute',
height: undefined,
top: '50%',
left: '50%',
transform: 'translate(-50%, -50%)',
...sx,
}}
/>
);
}
EmptyViewAbsoluteCentered.defaultProps = {