schlechtenburg/src/components/user/Layout/util.ts

20 lines
369 B
TypeScript
Raw Normal View History

2020-05-24 20:00:14 +00:00
import {
BlockProps,
2020-05-25 21:10:21 +00:00
BlockData,
2020-05-24 20:00:14 +00:00
} from '@components/TreeElement';
export interface LayoutData {
orientation: string;
2020-05-25 21:10:21 +00:00
children: BlockData[];
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: [],
});