diff --git a/src/renderers/dom/ui/elements/Sidebar/component.js b/src/renderers/dom/ui/elements/Sidebar/component.js index 165af47..f4811fe 100644 --- a/src/renderers/dom/ui/elements/Sidebar/component.js +++ b/src/renderers/dom/ui/elements/Sidebar/component.js @@ -18,8 +18,19 @@ class Sidebar extends React.Component { constructor (props) { super(props); + let defaultPanel; + if (this.props.templates) { + defaultPanel = 'template'; + } else if (this.props.layouts) { + defaultPanel = 'layout'; + } else if (this.props.themes) { + defaultPanel = 'theme'; + } else { + defaultPanel = 'content'; + } + this.state = { - panel: 'template' + panel: defaultPanel } this.handleConfigurationChange = this.handleConfigurationChange.bind(this); @@ -84,25 +95,41 @@ class Sidebar extends React.Component {