mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-15 17:56:21 +01:00
19 lines
611 B
TypeScript
19 lines
611 B
TypeScript
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) => (
|
|
<HomarrCardWrapper className={className}>
|
|
<WidgetsMenu integration={widgetId} widget={widget} />
|
|
{children}
|
|
</HomarrCardWrapper>
|
|
);
|