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