Skip to content

Commit

Permalink
Done 2 sections
Browse files Browse the repository at this point in the history
  • Loading branch information
cdedreuille committed Jun 13, 2024
1 parent c9b9a09 commit ef31c82
Show file tree
Hide file tree
Showing 17 changed files with 54 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/writing-docs/autodocs.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
---
title: 'Automatic documentation and Storybook'
sidebar:
order: 1
title: Autodocs
---

<YouTubeCallout id="BLUmt0j7OLY" title="INSTANT documentation with Storybook 7 AUTODOCS" />
Expand Down
3 changes: 3 additions & 0 deletions docs/writing-docs/build-documentation.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
---
title: 'Preview and build docs'
sidebar:
order: 4
title: Preview and build docs
---

Storybook allows you to create rich and extensive [documentation](./index.md) that will help you and any other stakeholder involved in the development process. Out of the box you have the tooling required to not only write it but also to preview it and build it.
Expand Down
3 changes: 3 additions & 0 deletions docs/writing-docs/doc-blocks.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
---
title: Doc blocks
sidebar:
order: 3
title: Doc blocks
---

<YouTubeCallout id="uAA1JvLcl-w" title="Avoid Documentation Nightmares with Storybook Doc Blocks" />
Expand Down
3 changes: 3 additions & 0 deletions docs/writing-docs/mdx.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
---
title: 'MDX'
sidebar:
order: 2
title: MDX
---

<YouTubeCallout id="YeIvFke5_5Y" title="MDX Storybook Quick Tips" />
Expand Down
3 changes: 3 additions & 0 deletions docs/writing-stories/args.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
---
title: 'Args'
sidebar:
order: 1
title: Args
---

<YouTubeCallout id="0gOfS6K0x0E" title="Build better UIs with Storybook Args" />
Expand Down
3 changes: 3 additions & 0 deletions docs/writing-stories/build-pages-with-storybook.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
---
title: 'Building pages with Storybook'
sidebar:
order: 9
title: Building pages and screens
---

Storybook helps you build any component, from small “atomic” components to composed pages. But as you move up the component hierarchy toward the page level, you deal with more complexity.
Expand Down
3 changes: 3 additions & 0 deletions docs/writing-stories/decorators.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
---
title: 'Decorators'
sidebar:
order: 3
title: Decorators
---

<YouTubeCallout id="4yi_yCTkgng" title="Storybook Decorators Crash Course" />
Expand Down
3 changes: 3 additions & 0 deletions docs/writing-stories/loaders.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
---
title: 'Loaders'
sidebar:
order: 5
title: Loaders
---

Loaders are asynchronous functions that load data for a story and its [decorators](./decorators.md). A story's loaders run before the story renders, and the loaded data injected into the story via its render context.
Expand Down
6 changes: 6 additions & 0 deletions docs/writing-stories/mocking-data-and-modules/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: Mocking data and modules
sidebar:
order: 8
title: Mocking data and modules
---
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
---
title: Mocking modules
sidebar:
order: 1
title: Modules
---

Components can also depend on modules that are imported into the component file. These can be from external packages or internal to your project. When rendering those components in Storybook or testing them, you may want to mock those modules to control their behavior.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
---
title: Mocking network requests
sidebar:
order: 2
title: Network requests
---

For components that make network requests (e.g. fetching data from a REST or GraphQL API), you can mock those requests using a tool like [Mock Service Worker (MSW)](https://mswjs.io/). MSW is an API mocking library, which relies on service workers to capture network requests and provides mocked data in response.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
---
title: Mocking providers
sidebar:
order: 3
title: Providers
---

export const SUPPORTED_RENDERERS = ['preact', 'react', 'solid'];
Expand Down
3 changes: 3 additions & 0 deletions docs/writing-stories/naming-components-and-hierarchy.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
---
title: 'Naming components and hierarchy'
sidebar:
order: 7
title: Naming components and hierarchy
---

<YouTubeCallout id="VPfjrhDlkVc" title="How to Name Stories and Components" />
Expand Down
3 changes: 3 additions & 0 deletions docs/writing-stories/parameters.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
---
title: 'Parameters'
sidebar:
order: 2
title: Parameters
---

<YouTubeCallout id="u32vmGVJY2U" title="Build Better Storybooks with Parameters" />
Expand Down
3 changes: 3 additions & 0 deletions docs/writing-stories/play-function.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
---
title: 'Play function'
sidebar:
order: 4
title: Play function
---

<YouTubeCallout id="dcuzwCHI940" title="Component testing in Storybook with play functions" />
Expand Down
3 changes: 3 additions & 0 deletions docs/writing-stories/stories-for-multiple-components.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
---
title: 'Stories for multiple components'
sidebar:
order: 10
title: Stories for multiple components
---

It's useful to write stories that [render two or more components](./index.md#stories-for-two-or-more-components) at once if those components are designed to work together. For example, `ButtonGroup`, `List`, and `Page` components.
Expand Down
3 changes: 3 additions & 0 deletions docs/writing-stories/tags.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
---
title: 'Tags'
sidebar:
order: 6
title: Tags
---

Tags allow you to control which stories are included in your Storybook, enabling many different uses of the same total set of stories. For example, you can use tags to include/exclude tests from the [test runner](../writing-tests/test-runner.md#run-tests-for-a-subset-of-stories). For more complex use cases, see the [recipes](#recipes) section, below.
Expand Down

0 comments on commit ef31c82

Please sign in to comment.