@@ -6,7 +6,9 @@ import ExpansionPanelDetails from "@material-ui/core/ExpansionPanelDetails";
66import JSONSchema from "../JSONSchema/JSONSchema" ;
77import ExpandMoreIcon from "@material-ui/icons/ExpandMore" ;
88import ReactMarkdown from "react-markdown" ;
9+ import JSONSchemaTree from "@xops.net/json-schema-to-react-tree" ;
910import { ContentDescriptorObject } from "@open-rpc/meta-schema" ;
11+ import "./ContentDescriptor.css" ;
1012
1113const styles = ( theme : Theme ) => ( {
1214 description : {
@@ -47,7 +49,7 @@ class ContentDescriptor extends Component<IProps> {
4749 < ExpansionPanelSummary
4850 expandIcon = { ( ! contentDescriptor . name || hideIcon ) ? null : < ExpandMoreIcon /> }
4951 style = { { justifyContent : "space-between" } } >
50- < div style = { { display : "flex" , justifyContent : "space-between" , width : "100%" , height : "100%" } } >
52+ < div style = { { display : "flex" , justifyContent : "space-between" , width : "100%" , height : "100%" , alignItems : "center" } } >
5153 < Typography className = { classes . heading } > { contentDescriptor . name } </ Typography >
5254 < Typography className = { classes . secondaryHeading } > { contentDescriptor . summary } </ Typography >
5355 { hideRequired ? null : < Typography className = { classes . secondaryHeading } >
@@ -63,7 +65,7 @@ class ContentDescriptor extends Component<IProps> {
6365 { contentDescriptor . schema &&
6466 < >
6567 < Typography variant = "body1" color = "primary" > schema</ Typography >
66- < JSONSchema schema = { contentDescriptor . schema } />
68+ < JSONSchemaTree schema = { contentDescriptor . schema } />
6769 </ >
6870 }
6971 </ >
0 commit comments