Skip to content

Commit

Permalink
Merge pull request #24508 from storybookjs/docs_minor_fixes
Browse files Browse the repository at this point in the history
Docs: Fix links and conditional rendering sections
  • Loading branch information
jonniebigodes authored Oct 24, 2023
2 parents b2d66c6 + 7128bbb commit 3e098fd
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docs/configure/features-and-behavior.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: 'Features and behavior'
---

To control the layout of Storybook’s UI you can use `addons.setConfig` in your [`.storybook/manager.js`](./overview.md#configure-story-rendering):
To control the layout of Storybook’s UI you can use `addons.setConfig` in your `.storybook/manager.js`:

<!-- prettier-ignore-start -->

Expand Down Expand Up @@ -56,4 +56,4 @@ You can use URL parameters to configure some of the available features:
| **showPanel** | `panel` | `false`, `right`, `bottom` |
| **selectedPanel** | `addonPanel` | Any panel ID |
| **showTabs** | `tabs` | `true` |
| --- | `instrument` | `false`, `true` |
| --- | `instrument` | `false`, `true` |
2 changes: 1 addition & 1 deletion docs/configure/sidebar-and-urls.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ By default, Storybook will treat your top-level nodes as “roots”. Roots are

![Storybook sidebar story roots](./sidebar-roots.png)

If you’d prefer to show top-level nodes as folders rather than roots, you can set the `sidebar.showRoots` option to `false` in [`./storybook/manager.js`](./overview.md#configure-story-rendering):
If you’d prefer to show top-level nodes as folders rather than roots, you can set the `sidebar.showRoots` option to `false` in [`./storybook/manager.js`](./features-and-behavior.md):

<!-- prettier-ignore-start -->

Expand Down
4 changes: 2 additions & 2 deletions docs/configure/theming.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Make sure you have installed [`@storybook/manager-api`](https://www.npmjs.com/pa

<!-- prettier-ignore-end -->

As an example, you can tell Storybook to use the "dark" theme by modifying [`.storybook/manager.js`](./overview.md#configure-story-rendering):
As an example, you can tell Storybook to use the "dark" theme by modifying [`.storybook/manager.js`](./features-and-behavior.md):

<!-- prettier-ignore-start -->

Expand All @@ -44,7 +44,7 @@ When setting a theme, set a complete theme object. The theme is replaced, not co

[Storybook Docs](../writing-docs/introduction.md) uses the same theme system as Storybook’s UI but is themed independently from the main UI.

Supposing you have a Storybook theme defined for the main UI in [`.storybook/manager.js`](./overview.md#configure-story-rendering):
Supposing you have a Storybook theme defined for the main UI in [`.storybook/manager.js`](./features-and-behavior.md):

<!-- prettier-ignore-start -->

Expand Down
4 changes: 4 additions & 0 deletions docs/writing-stories/build-pages-with-storybook.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,8 @@ Another mocking approach is to use libraries that intercept calls at a lower lev

Like the [import mocking](##mocking-imports) above, once you have a mock, you’ll still want to set the return value of the mock per-story basis. Do this in Storybook with a [decorator](./decorators.md) that reads the story's [parameters](./parameters.md).

<IfRenderer renderer={['react', 'solid']}>

### Avoiding mocking dependencies

It's possible to avoid mocking the dependencies of connected "container" components entirely by passing them around via props or React context. However, it requires a strict split of the container and presentational component logic. For example, if you have a component responsible for data fetching logic and rendering DOM, it will need to be mocked as previously described.
Expand Down Expand Up @@ -394,3 +396,5 @@ If you’ve set up `GlobalContainerContext`, you’ll need to set up a decorator
/>

<!-- prettier-ignore-end -->

</IfRenderer>

0 comments on commit 3e098fd

Please sign in to comment.