mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-03 20:15:57 +01:00
Add Module wrapper
This commit is contained in:
21
components/modules/moduleWrapper.tsx
Normal file
21
components/modules/moduleWrapper.tsx
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
import { Card, FloatingTooltip, Tooltip, useMantineTheme } from '@mantine/core';
|
||||||
|
import { IModule } from './modules';
|
||||||
|
|
||||||
|
export default function ModuleWrapper(props: any) {
|
||||||
|
const { module }: { module: IModule } = props;
|
||||||
|
const theme = useMantineTheme();
|
||||||
|
console.log(module.title);
|
||||||
|
return (
|
||||||
|
<Card
|
||||||
|
mx="sm"
|
||||||
|
radius="lg"
|
||||||
|
shadow="sm"
|
||||||
|
style={{
|
||||||
|
// Make background color of the card depend on the theme
|
||||||
|
backgroundColor: theme.colorScheme === 'dark' ? theme.colors.dark[6] : "white",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{<module.component />}
|
||||||
|
</Card>
|
||||||
|
);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user