Skip to content

Instantly share code, notes, and snippets.

@Lily418
Created June 7, 2019 14:58
Show Gist options
  • Save Lily418/39aaf65404f5774659242da6ac87a3f7 to your computer and use it in GitHub Desktop.
Save Lily418/39aaf65404f5774659242da6ac87a3f7 to your computer and use it in GitHub Desktop.
import * as React from 'react'
import { connect } from 'react-redux';
import { MaterialHorizontalLayout } from '@jsonforms/material-renderers'
import {
mapStateToLayoutProps
} from '@jsonforms/core';
const WithUnit = (props) => {
let uiSchema = props.uischema
uiSchema.type = "HorizontalLayout"
console.log(MaterialHorizontalLayout)
return (<MaterialHorizontalLayout {...props}/>)
}
export default connect(mapStateToLayoutProps)(WithUnit)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment