🎨 Improved changeability of wrappers with new wrapper content component

This commit is contained in:
Meierschlumpf
2022-12-19 18:03:52 +01:00
parent 8f7a3111ca
commit 383a7fa04b
6 changed files with 91 additions and 117 deletions

View File

@@ -0,0 +1,20 @@
import { ReactNode } from 'react';
import { HomarrCardWrapper } from '../components/Dashboard/Tiles/HomarrCardWrapper';
import { WidgetsMenu } from '../components/Dashboard/Tiles/Widgets/WidgetsMenu';
import { IWidget } from './widgets';
interface WidgetWrapperProps {
widgetId: string;
widget: IWidget<string, any>;
className: string;
children: ReactNode;
}
export const WidgetWrapper = ({ widgetId, widget, className, children }: WidgetWrapperProps) => {
return (
<HomarrCardWrapper className={className}>
<WidgetsMenu integration={widgetId} widget={widget} />
{children}
</HomarrCardWrapper>
);
};