Fix EmptyView styling
This commit is contained in:
@@ -40,6 +40,7 @@ export function EmptyView({ message, messageExtra, retry, noFaces, sx }: EmptyVi
|
|||||||
sx={{
|
sx={{
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
|
justifyContent: 'center',
|
||||||
height: '100%',
|
height: '100%',
|
||||||
...sx,
|
...sx,
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -9,7 +9,19 @@
|
|||||||
import { EmptyView, EmptyViewProps } from '@/components/util/EmptyView.tsx';
|
import { EmptyView, EmptyViewProps } from '@/components/util/EmptyView.tsx';
|
||||||
|
|
||||||
export function EmptyViewAbsoluteCentered({ sx, ...emptyViewProps }: EmptyViewProps) {
|
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 = {
|
EmptyViewAbsoluteCentered.defaultProps = {
|
||||||
|
|||||||
Reference in New Issue
Block a user