🎨 Migrate all wrapper to use WidgetWrapper

This commit is contained in:
Meierschlumpf
2022-12-19 18:26:04 +01:00
parent 8fa9cfaccf
commit c2186c2525
9 changed files with 153 additions and 202 deletions

View File

@@ -36,11 +36,7 @@ export const AppTile = ({ className, app }: AppTileProps) => {
return (
<HomarrCardWrapper className={className}>
{/* TODO: add app menu */}
<div style={{ position: 'absolute', top: 10, right: 10 }}>
<AppMenu app={app} />
</div>
<AppMenu app={app} />
{!app.url || isEditMode ? (
<UnstyledButton

View File

@@ -3,6 +3,7 @@ import { MutableRefObject, RefObject } from 'react';
import { AppType } from '../../../types/app';
import Widgets from '../../../widgets';
import { IWidget, IWidgetDefinition } from '../../../widgets/widgets';
import { WidgetWrapper } from '../../../widgets/WidgetWrapper';
import { Tiles } from '../Tiles/tilesDefinitions';
import { GridstackTileWrapper } from '../Tiles/TileWrapper';
@@ -51,7 +52,9 @@ export const WrapperContent = ({ apps, refs, widgets }: WrapperContentProps) =>
{...widget.shape.location}
{...widget.shape.size}
>
<definition.component className="grid-stack-item-content" widget={widget} />
<WidgetWrapper className="grid-stack-item-content" widget={widget} widgetId={widget.id}>
<definition.component className="grid-stack-item-content" widget={widget} />
</WidgetWrapper>
</GridstackTileWrapper>
);
})}