schlechtenburg/packages/layout/lib/util.ts

13 lines
292 B
TypeScript

import { IBlockData } from '@schlechtenburg/core';
export interface ILayoutData {
orientation: string;
children: IBlockData<any>[];
}
export const getDefaultData: (data?: Partial<ILayoutData>) => ILayoutData = (data = {}) => ({
orientation: 'vertical',
children: [],
...data,
});