Create the Dashboard record show page (#14423)
Closes https://github.com/twentyhq/core-team-issues/issues/1438 - Reorganized PageLayout module - Created `DashboardRenderer` and `PageLayoutRenderer` - Created stories for the `PageLayoutRenderer` - Refactored the Widget components https://github.com/user-attachments/assets/27e9ac8f-b237-4c21-8494-3fab6d65af3a
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import { type GridBounds } from './calculateGridBoundsFromSelectedCells';
|
||||
|
||||
export const getDefaultWidgetPosition = (
|
||||
draggedArea: GridBounds | null,
|
||||
defaultSize: { w: number; h: number },
|
||||
): GridBounds => {
|
||||
if (draggedArea !== null) {
|
||||
return draggedArea;
|
||||
}
|
||||
|
||||
return {
|
||||
x: 0,
|
||||
y: 0,
|
||||
w: defaultSize.w,
|
||||
h: defaultSize.h,
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user