diff --git a/src/Form.css b/src/Form.css new file mode 100644 index 0000000..92c6611 --- /dev/null +++ b/src/Form.css @@ -0,0 +1,3 @@ +.ant-input-disabled { + border: none; +} diff --git a/src/Form.tsx b/src/Form.tsx index 004d469..5ae4c6b 100644 --- a/src/Form.tsx +++ b/src/Form.tsx @@ -22,6 +22,7 @@ import { UnknownRenderer } from './UnknownRenderer'; import { RankedTester } from './testers'; import { IViewDescr, IViewDescrElement, IViewKind, IViewKindElement } from './models/uischema'; import { JsObject } from '@agentlab/sparql-jsld-client'; +import './Form.css'; export interface ControlComponent { data: any; diff --git a/src/layouts/AntdHorizontalLayout.tsx b/src/layouts/AntdHorizontalLayout.tsx index 0b47508..c50d11c 100644 --- a/src/layouts/AntdHorizontalLayout.tsx +++ b/src/layouts/AntdHorizontalLayout.tsx @@ -47,11 +47,12 @@ export const AntdHorizontalLayoutRenderer: React.FC = ({ ); }; - const justify: any = viewKindElement.options ? viewKindElement.options.justify : 'center'; + const justify: any = viewKindElement.options?.justify || 'center'; + const align: any = viewKindElement.options?.align || 'middle'; const rowStyle: any = { flexWrap: 'nowrap' }; if (viewKindElement.options && viewKindElement.options.width === 'all-empty-space') rowStyle.width = '100%'; return ( - + {renderLayoutElements({ viewKind, viewKindElement, viewDescr, enabled, Render })} ); diff --git a/stories/FormWithColumns.stories.tsx b/stories/FormWithColumns.stories.tsx index 5d14a33..ddb3ac5 100644 --- a/stories/FormWithColumns.stories.tsx +++ b/stories/FormWithColumns.stories.tsx @@ -96,6 +96,7 @@ const viewKinds = [ '@type': 'aldkg:HorizontalLayout', options: { justify: 'start', // start end center space-between space-around + align: 'flex-start', //contentSize: true, style: { //flexGrow: '5',