@tomino/dynamic-form-semantic-ui
Version:
Semantic UI form renderer based on dynamic form generation
36 lines • 1.65 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const react_1 = tslib_1.__importDefault(require("react"));
const editor_common_1 = require("../editor/editor_common");
const tab_view_1 = require("./tab_view");
const layouts_common_editor_1 = require("../editor/layouts_common_editor");
const editor_context_1 = require("../editor/editor_context");
const TabsEditorComponent = (props) => {
const context = react_1.default.useContext(editor_context_1.EditorContext);
return (react_1.default.createElement(tab_view_1.TabView.Component, Object.assign({}, props, { EmptyCell: (props) => (react_1.default.createElement(layouts_common_editor_1.SingleDropCell, Object.assign({ id: "0" }, props, { editorState: context }))) })));
};
TabsEditorComponent.displayName = 'TabsEditor';
exports.TabsEditor = {
Component: TabsEditorComponent,
bound: true,
valueProvider: 'value',
title: 'Tabs',
control: 'Tabs',
icon: 'th list',
props: {
...editor_common_1.propGroup('Tab Config', {
value: editor_common_1.boundProp({ type: 'string' }, 'SourceHandler'),
valueField: editor_common_1.boundProp({ type: 'string' }),
textField: editor_common_1.boundProp({ type: 'string' }),
vertical: editor_common_1.prop({ type: 'boolean' })
}),
menuItems: editor_common_1.tableProp({}, 'Tab Items', [
{
control: 'Input',
props: { placeholder: 'Icon', value: { source: 'icon', label: 'Icon' } }
}
])
}
};
//# sourceMappingURL=tab_editor.js.map