import { ComponentMetadata } from "@alilc/lowcode-types"; import snippets from './snippets'; export default { snippets, componentName: 'Space', title: 'spacing', category: 'Layout', props: [ { name: 'align', title: { label: 'alignment', tip: 'alignment' }, propType: { type: 'oneOf', value: ['start', 'end', 'center', 'baseline'], }, }, { name: 'direction', title: { label: 'spacing direction', tip: 'spacing direction' }, propType: { type: 'oneOf', value: ['vertical', 'horizontal'] }, }, { name: 'size', title: { label: 'spacing size', tip: 'spacing size' }, propType: { type: 'oneOfType', value: [ { type: 'oneOf', value: ['small', 'middle', 'large'], }, 'number', ], }, defaultValue: 'middle', }, { name: 'wrap', title: { label: 'to wrap lines automatically', tip: 'Whether to wrap lines automatically' }, propType: "bool", condition: { type: 'JSFunction', value: 'target => target.getProps().getPropValue("direction")==="horizontal"', }, }, { name: 'split', title: { label: 'spacer component', tip: 'Spacer components can be dragged in. Commonly used are vertical dividers.' }, propType: "node", }, ], configure: { component: { isContainer: true }, supports: { style: true } }, } as ComponentMetadata | any;