Skip to content

Commit

Permalink
improvement: ability to configure default pattern info code panel #1155
Browse files Browse the repository at this point in the history
… (#1156)

* improvement: ability to configure default pattern info code panel #1155
* docs(config): added the default config values #1155

Co-authored-by: Maximilian Franzke <[email protected]>
Co-authored-by: Maximilian Franzke <[email protected]>
Co-authored-by: Maximilian Franzke <[email protected]>
Co-authored-by: Brian Muenzenmeyer <[email protected]>
Co-authored-by: Josef Bredreck <[email protected]>
  • Loading branch information
6 people authored Aug 25, 2020
1 parent 125f1fd commit c3fa917
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions packages/docs/src/docs/advanced-config-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ Sets whether or not you want the styleguide to load with the pattern info open o

**default**: `false`

### defaultPatternInfoPanelCode (optional)

Sets default active pattern info code panel by file extension - if unset, uses the value out of _patternExtension_ config value, or instead use value `html` to display the html code initially, or the value defined for the _patternExtension_.

**default**: _patternExtension_ value (`"hbs"` | `"mustache"` | `"twig"` | `"html"`)

### ishControlsHide

Sets whether or not to hide navigation options within the styleguide.
Expand Down
2 changes: 1 addition & 1 deletion packages/uikit-workshop/src/scripts/components/panels.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ function init(event) {
Panels.add({
id: 'pl-panel-html',
name: 'HTML',
default: false,
default: window.config.defaultPatternInfoPanelCode && window.config.defaultPatternInfoPanelCode === 'html',
templateID: 'pl-panel-template-code',
httpRequest: true,
httpRequestReplace: fileSuffixMarkup + '.html',
Expand Down

0 comments on commit c3fa917

Please sign in to comment.