Files
Homarr/src/components/layout/Background.tsx
Aimsucks 423f8110b9 Added a background image input
Added an input in the advanced options for a background image. Also removed an unused import from my previous commit and changed the margin on the header bar to padding instead.
2022-06-07 17:36:05 +00:00

20 lines
432 B
TypeScript

import { Global } from '@mantine/core';
import { useConfig } from '../../tools/state';
export function Background() {
const { config } = useConfig();
return (
<Global
styles={{
body: {
backgroundImage: `url('${config.settings.background}')` || '',
backgroundPosition: 'center',
backgroundSize: 'cover',
backgroundRepeat: 'no-repeat',
},
}}
/>
);
}