mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-16 02:06:21 +01:00
🎨 Improved changeability of wrappers with new wrapper content component
This commit is contained in:
20
src/widgets/WidgetWrapper.tsx
Normal file
20
src/widgets/WidgetWrapper.tsx
Normal 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>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user