Skip to content

Commit

Permalink
Add sidebar_panels docs
Browse files Browse the repository at this point in the history
  • Loading branch information
allmarkedup committed Nov 22, 2023
1 parent 7e9adde commit cbd5d4d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/src/_data/config_options.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ previews:
example: config.lookbook.preview_inspector.drawer_panels = [:notes, :params]
description: List of panels to display in the preview inspector

- name: preview_inspector.sidebar_panels
types: Array
default: '[:previews, :pages]'
example: config.lookbook.preview_inspector.sidebar_panels = [:pages, :previews]
description: Controls the order and availability of the sidebar navigation panels.

- name: preview_embeds.enabled
types: Boolean
default: "true"
Expand Down
10 changes: 10 additions & 0 deletions docs/src/_guide/ui/other.md → docs/src/_guide/ui/navigation.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,16 @@ title: Navigation
```
<% end %>

<%= render section("Sections order", id: "sections-order") do |s| %>

To change the order of the navigation sections in the sidebar, use the `preview_inspector.sidebar_panels` config option:

```ruby
# Display pages before previews in the sidebar
config.lookbook.preview_inspector.sidebar_panels = [:pages, :previews]
```
<% end %>

<%= render section("Scenario order", id: "scenario-order") do |s| %>
By default scenarios are listed in the navigation in the order in which they are defined in the preview class.

Expand Down

0 comments on commit cbd5d4d

Please sign in to comment.