MainLayout for theme persistence
This commit is contained in:
21
src/components/MainLayout.tsx
Normal file
21
src/components/MainLayout.tsx
Normal file
@@ -0,0 +1,21 @@
|
||||
import { Box } from '@mantine/core';
|
||||
import { Outlet } from 'react-router-dom';
|
||||
|
||||
export function MainLayout({ theme }: any) {
|
||||
return (
|
||||
<Box
|
||||
style={{
|
||||
width: '100%',
|
||||
height: '100%',
|
||||
position: 'fixed',
|
||||
backgroundImage: `linear-gradient(${theme.backgroundColor}33, ${theme.backgroundColor}33), url(/backgrounds/${theme.backgroundImage})`,
|
||||
backgroundSize: 'cover',
|
||||
backgroundRepeat: 'no-repeat',
|
||||
backgroundPosition: 'center',
|
||||
zIndex: -1,
|
||||
}}
|
||||
>
|
||||
<Outlet />
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user