bd16c77fed
adding min height and widths on each chart this Pr address this followups - - https://github.com/twentyhq/core-team-issues/issues/1710#issuecomment-3405312108 - <img width="843" height="38" alt="Screenshot 2025-10-15 at 15 19 27" src="https://github.com/user-attachments/assets/f33da21f-a605-40f9-b7fa-02be9dff5908" /> - <img width="830" height="42" alt="Screenshot 2025-10-15 at 15 19 40" src="https://github.com/user-attachments/assets/bf6f3783-b5cc-44c0-94a2-029a489c852e" /> video QA before: https://github.com/user-attachments/assets/28262a7b-531f-4dcb-9047-c587fe3d8af6 after: https://github.com/user-attachments/assets/b0fdbc18-3a7e-4c85-98b6-5799d7207bb4
12 lines
422 B
TypeScript
12 lines
422 B
TypeScript
import { DEFAULT_WIDGET_SIZE } from '@/page-layout/constants/DefaultWidgetSize';
|
|
import { WIDGET_SIZES } from '@/page-layout/constants/WidgetSizes';
|
|
import { type GraphType } from '~/generated/graphql';
|
|
|
|
export const getWidgetSize = (
|
|
graphType: GraphType,
|
|
type: 'default' | 'minimum',
|
|
): { w: number; h: number } => {
|
|
const sizeConfig = WIDGET_SIZES[graphType] ?? DEFAULT_WIDGET_SIZE;
|
|
return sizeConfig[type];
|
|
};
|