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