Skip to content

Commit 86af897

Browse files
committed
Add text to raw component
1 parent 97895c8 commit 86af897

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,18 @@ const req = require.context('@docs/doc-components', true, /\.js/);
2020
const useStyles = makeStyles((theme) => ({
2121
heading: {
2222
fontSize: theme.typography.pxToRem(15),
23-
fontWeight: theme.typography.fontWeightRegular
23+
fontWeight: theme.typography.fontWeightRegular,
24+
flexGrow: 1
2425
},
2526
formWrapper: {
2627
padding: 16
2728
},
2829
formContainer: {
2930
marginTop: 16
31+
},
32+
secondaryHeading: {
33+
fontSize: theme.typography.pxToRem(15),
34+
color: theme.palette.text.secondary
3035
}
3136
}));
3237

@@ -47,6 +52,7 @@ const RawComponent = (props) => {
4752
<ExpansionPanel>
4853
<ExpansionPanelSummary expandIcon={<CodeIcon />}>
4954
{content.Component && <Typography className={classes.heading}>{content.Component.name}</Typography>}
55+
<Typography className={classes.secondaryHeading}>Click to expand example code</Typography>
5056
</ExpansionPanelSummary>
5157
<ExpansionPanelDetails style={{ padding: 0 }}>
5258
<CodeEditor value={content.text} />

0 commit comments

Comments
 (0)