Files
twenty/packages/twenty-front/src/modules/page-layout/constants/WidgetSizes.ts
T
2025-10-15 19:35:56 +05:30

34 lines
764 B
TypeScript

import { GraphType } from '~/generated-metadata/graphql';
type WidgetSizeConfig = {
default: { w: number; h: number };
minimum: { w: number; h: number };
};
export const WIDGET_SIZES: Record<GraphType, WidgetSizeConfig> = {
[GraphType.NUMBER]: {
default: { w: 3, h: 2 },
minimum: { w: 2, h: 2 },
},
[GraphType.GAUGE]: {
default: { w: 3, h: 4 },
minimum: { w: 3, h: 4 },
},
[GraphType.PIE]: {
default: { w: 4, h: 4 },
minimum: { w: 3, h: 4 },
},
[GraphType.VERTICAL_BAR]: {
default: { w: 6, h: 6 },
minimum: { w: 5, h: 5 },
},
[GraphType.HORIZONTAL_BAR]: {
default: { w: 6, h: 6 },
minimum: { w: 5, h: 5 },
},
[GraphType.LINE]: {
default: { w: 6, h: 10 },
minimum: { w: 5, h: 5 },
},
};