support multiple custom text blocks

This commit is contained in:
dan13ram
2023-01-19 00:10:43 +05:30
committed by Dan OneTree
parent 7ada3b75ed
commit 24fcec5f17

View File

@@ -11,7 +11,10 @@ import {
export const GRID_ROW_HEIGHT = 32;
export const HEIGHT_MODIFIER = 1.8;
export const MULTIPLE_ALLOWED_BOXES = [BoxTypes.EMBEDDED_URL] as Array<BoxType>;
export const MULTIPLE_ALLOWED_BOXES = [
BoxTypes.EMBEDDED_URL,
BoxTypes.CUSTOM_TEXT,
] as Array<BoxType>;
export const removeBoxFromLayouts = (
layouts: Layouts,
@@ -189,6 +192,7 @@ const DEFAULT_BOX_HEIGHTS: Partial<Record<BoxType, number>> = {
// common boxes
[BoxTypes.ADD_NEW_BOX]: 3,
[BoxTypes.EMBEDDED_URL]: 7,
[BoxTypes.CUSTOM_TEXT]: 7,
};
export const getBoxLayoutItemDefaults = (type: BoxType): Layout => ({