@tomino/dynamic-form-semantic-ui
Version:
Semantic UI form renderer based on dynamic form generation
36 lines • 1.36 kB
JavaScript
import React from 'react';
import { propGroup, prop, gapProp } from '../editor/editor_common';
import { StackView } from './stack_view';
import { DropComponentEditor } from '../editor/droppable_editor';
export const StackEditorComponent = props => (React.createElement(DropComponentEditor, Object.assign({}, props, { Component: StackView.Component, layout: props.formElement.props.layout })));
export const StackEditor = {
Component: StackEditorComponent,
control: 'Stack',
icon: 'align justify',
title: 'Stack Layout',
group: 'Layout',
defaultProps: {
layout: 'column'
},
props: propGroup('Stack', {
layout: prop({
documentation: 'Items can either be stacked in rows or columns',
label: 'Layout',
control: 'Select',
type: 'string',
$enum: [{ text: 'Rows', value: 'row' }, { text: 'Columns', value: 'column' }]
}),
final: prop({
type: 'boolean',
documentation: 'Prohibits adding new elements to the stack. This is used mostly in editor for visual appeal.'
}),
gap: gapProp({
documentation: 'Spacing between cells'
}),
padding: gapProp({
documentation: 'Cell padding',
label: 'Padding'
})
})
};
//# sourceMappingURL=stack_editor.js.map