import React from 'react' ; import { LayoutProps , RankedTester , rankWith , uiTypeIs , VerticalLayout , } from '@jsonforms/core' ; import { MaterialLayoutRenderer , MaterialLayoutRendererProps } from '../util/layout' ; import { withJsonFormsLayoutProps } from '@jsonforms/react' ; type { RankedTester } export const materialVerticalLayoutTester = rankWith ( 1 , uiTypeIs ( 'VerticalLayout' ) ) ; export const MaterialVerticalLayoutRenderer = ( { uischema , schema , path , enabled , visible , renderers , cells } ) => { const verticalLayout = uischema as VerticalLayout ; const childProps = { elements : verticalLayout . elements , schema , path , enabled , direction : 'column' , visible } ; return < MaterialLayoutRenderer { ... childProps } renderers = { renderers } cells = { cells } / > ; } ; export default withJsonFormsLayoutProps ( MaterialVerticalLayoutRenderer ) ;