schlechtenburg/packages/layout/lib/util.ts

13 lines
292 B
TypeScript
Raw Normal View History

import { IBlockData } from '@schlechtenburg/core';
2020-05-24 20:00:14 +00:00
2022-03-11 17:23:14 +00:00
export interface ILayoutData {
2020-05-24 20:00:14 +00:00
orientation: string;
children: IBlockData<any>[];
2020-05-24 20:00:14 +00:00
}
2022-12-28 18:46:51 +00:00
export const getDefaultData: (data?: Partial<ILayoutData>) => ILayoutData = (data = {}) => ({
2020-05-24 20:00:14 +00:00
orientation: 'vertical',
children: [],
2022-12-28 18:46:51 +00:00
...data,
2020-05-24 20:00:14 +00:00
});