schlechtenburg/packages/layout/lib/util.ts

21 lines
360 B
TypeScript
Raw Normal View History

2020-05-24 20:00:14 +00:00
import {
BlockProps,
2020-05-27 15:06:14 +00:00
Block,
2020-05-25 21:10:21 +00:00
BlockData,
2020-12-30 01:32:46 +00:00
} from '/@/blocks';
2020-05-24 20:00:14 +00:00
export interface LayoutData {
orientation: string;
2020-05-27 15:06:14 +00:00
children: Block[];
2020-05-24 20:00:14 +00:00
}
export interface LayoutProps extends BlockProps {
data: LayoutData;
2020-05-27 13:57:57 +00:00
eventUpdate: (b?: BlockData) => void;
2020-05-24 20:00:14 +00:00
}
export const getDefaultData: () => LayoutData = () => ({
orientation: 'vertical',
children: [],
});