Skip to content

Commit

Permalink
polishing
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Jan 10, 2020
1 parent 467807c commit 7e57d32
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions docs/src/pages/customization/default-theme/DefaultTheme.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ ObjectEntry.propTypes = {
};

function Inspector(props) {
const { data, expandPaths } = props;
const { data, expandPaths, ...other } = props;

const keyPrefix = '$ROOT';
const defaultExpanded = React.useMemo(() => {
Expand All @@ -153,6 +153,7 @@ function Inspector(props) {
defaultEndIcon={<div style={{ width: 24 }} />}
defaultExpanded={defaultExpanded}
defaultExpandIcon={<CollapseIcon />}
{...other}
>
{Object.keys(data).map(objectKey => {
return (
Expand All @@ -175,14 +176,13 @@ Inspector.propTypes = {

const styles = theme => ({
root: {
width: '100%',
},
inspector: {
backgroundColor: '#333',
borderRadius: 4,
color: '#fff',
display: 'block',
padding: theme.spacing(2),
paddingTop: 0,
minHeight: theme.spacing(40),
width: '100%',
borderRadius: theme.shape.borderRadius,
padding: theme.spacing(1),
},
switch: {
paddingBottom: theme.spacing(1),
Expand Down Expand Up @@ -281,7 +281,7 @@ function DefaultTheme(props) {
}
label={t('useDarkTheme')}
/>
<Inspector data={data} expandPaths={expandPaths} expandLevel={checked ? 100 : 1} />
<Inspector className={classes.inspector} data={data} expandPaths={expandPaths} />
</div>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

Explore the default theme object:

{{"demo": "pages/customization/default-theme/DefaultTheme.js", "hideHeader": true}}
{{"demo": "pages/customization/default-theme/DefaultTheme.js", "hideHeader": true, "bg": "inline"}}

> Tip: you can play with the documentation theme object in your browser console,
> as the `theme` variable is exposed on all the documentation pages.
Expand Down

0 comments on commit 7e57d32

Please sign in to comment.