Skip to content

Commit a2dafd6

Browse files
committed
Fix layout for component example
1 parent 0ccbb4b commit a2dafd6

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

packages/react-renderer-demo/src/app/src/components/component-example-text.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ const ComponentExampleText = (props) => {
1313

1414
const baseStructure = baseExamples.find(item => item.component === component);
1515

16-
return <React.Fragment>
16+
return (<React.Fragment>
1717
<ComponentExample activeMapper={ activeMapper } component={ component }/>
18-
<baseStructure.ContentText activeMapper={ activeMapper } component={ component }/>;
19-
</React.Fragment>;
18+
<baseStructure.ContentText activeMapper={ activeMapper } component={ component }/>
19+
</React.Fragment>);
2020
};
2121

2222
export default ComponentExampleText;

packages/react-renderer-demo/src/app/src/components/component-example.js

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -291,22 +291,12 @@ class ComponentExample extends Component {
291291
direction="row"
292292
spacing={ 4 }
293293
>
294-
<Grid item xs={ 4 } >
295-
<Typography variant="h5" gutterBottom>
294+
<Grid item xs={ 12 } md={ 4 } >
295+
<Grid item xs={ 12 }>
296+
<Typography variant="h5" gutterBottom>
296297
Schema
297-
</Typography>
298-
</Grid>
299-
<Grid item xs={ 3 } >
300-
<Typography variant="h5" gutterBottom>
301-
Props
302-
</Typography>
303-
</Grid>
304-
<Grid item xs={ 5 } >
305-
<Typography variant="h5" gutterBottom>
306-
Preview
307-
</Typography>
308-
</Grid>
309-
<Grid item xs={ 4 } >
298+
</Typography>
299+
</Grid>
310300
<div style={{ background: '#1d1f21', position: 'relative' }}>
311301
<Grid item xs={ 12 } container={ true } justify='flex-end' style={{ position: 'absolute', zIndex: 100 }}>
312302
<CopyToClipboard text={ editedValue } onCopy={ this.handleTooltipOpen }>
@@ -334,14 +324,24 @@ class ComponentExample extends Component {
334324
/>
335325
</div>
336326
</Grid>
337-
<Grid item xs={ 3 }>
327+
<Grid item xs={ 12 } md={ 3 }>
328+
<Grid item xs={ 12 }>
329+
<Typography variant="h5" gutterBottom>
330+
Props
331+
</Typography>
332+
</Grid>
338333
<Card square>
339334
<CardContent>
340335
{ this.renderActions(variants) }
341336
</CardContent>
342337
</Card>
343338
</Grid>
344-
<Grid item xs={ 5 } >
339+
<Grid item xs={ 12 } md={ 5 } >
340+
<Grid item xs={ 12 }>
341+
<Typography variant="h5" gutterBottom>
342+
Preview
343+
</Typography>
344+
</Grid>
345345
<Card square style={{ overflow: 'initial' }}>
346346
<div style={{ padding: 8 }}>
347347
<FormControl component="fieldset">

0 commit comments

Comments
 (0)