Skip to content

Commit

Permalink
Merge pull request #23797 from storybookjs/chore_docs_adds_videos
Browse files Browse the repository at this point in the history
Docs: Video coverage extended
  • Loading branch information
jonniebigodes authored Aug 10, 2023
2 parents 0eaaa8c + 601e902 commit af906e2
Show file tree
Hide file tree
Showing 14 changed files with 31 additions and 1 deletion.
2 changes: 2 additions & 0 deletions docs/api/doc-block-argtypes.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
title: 'ArgTypes'
---

<YouTubeCallout id="uAA1JvLcl-w" title="Avoid Documentation Nightmares with Storybook's ArgTypes Doc Block" params='start=232' />

The `ArgTypes` block can be used to show a static table of [arg types](./argtypes.md) for a given component, as a way to document its interface.

<div class="aside">
Expand Down
2 changes: 2 additions & 0 deletions docs/api/doc-block-canvas.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
title: 'Canvas'
---

<YouTubeCallout id="uAA1JvLcl-w" title="Avoid Documentation Nightmares with Storybook's Canvas Doc Block" params='start=148' />

The `Canvas` block is a wrapper around a [`Story`](./doc-block-story.md), featuring a toolbar that allows you to interact with its content while automatically providing the required [`Source`](./doc-block-source.md) snippets.

![Screenshot of Canvas block](./doc-block-canvas.png)
Expand Down
2 changes: 2 additions & 0 deletions docs/api/doc-block-controls.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
title: 'Controls'
---

<YouTubeCallout id="uAA1JvLcl-w" title="Avoid Documentation Nightmares with Storybook's Controls Doc Block" params='start=240' />

The `Controls` block can be used to show a dynamic table of args for a given story, as a way to document its interface, and to allow you to change the args for a (separately) rendered story (via the [`Story`](./doc-block-story.md) or [`Canvas`](./doc-block-canvas.md) blocks).

<div class="aside">
Expand Down
2 changes: 2 additions & 0 deletions docs/api/doc-block-description.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
title: 'Description'
---

<YouTubeCallout id="uAA1JvLcl-w" title="Avoid Documentation Nightmares with Storybook's Description Doc Block" params='start=84' />

The `Description` block displays the description for a component, story, or meta, obtained from their respective JSDoc comments.

![Screenshot of Description block](./doc-block-title-subtitle-description.png)
Expand Down
2 changes: 2 additions & 0 deletions docs/api/doc-block-primary.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
title: 'Primary'
---

<YouTubeCallout id="uAA1JvLcl-w" title="Avoid Documentation Nightmares with Storybook's Primary Doc Block" params='start=209' />

The `Primary` block displays the primary (first defined in the stories file) story, in a [`Story`](./doc-block-story.md) block. It is typically rendered immediately under the title in a docs entry.

![Screenshot of Primary block](./doc-block-primary.png)
Expand Down
2 changes: 2 additions & 0 deletions docs/api/doc-block-source.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
title: 'Source'
---

<YouTubeCallout id="uAA1JvLcl-w" title="Avoid Documentation Nightmares with Storybook's Source Doc Block" params='start=136' />

The `Source` block is used to render a snippet of source code directly.

![Screenshot of Source block](./doc-block-source.png)
Expand Down
2 changes: 2 additions & 0 deletions docs/api/doc-block-stories.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
title: 'Stories'
---

<YouTubeCallout id="uAA1JvLcl-w" title="Avoid Documentation Nightmares with Storybook's Stories Doc Block" params='start=185' />

The `Stories` block renders the full collection of stories in a stories file.

![Screenshot of Stories block](./doc-block-stories.png)
Expand Down
4 changes: 4 additions & 0 deletions docs/api/doc-block-story.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
title: 'Story'
---

<YouTubeCallout id="uAA1JvLcl-w" title="Avoid Documentation Nightmares with Storybook's Story Doc Block" params='start=124' />

Stories (component tests) are Storybook's fundamental building blocks.

In Storybook Docs, you can render any of your stories from your CSF files in the context of an MDX file with all annotations (parameters, args, loaders, decorators, play function) applied using the `Story` block.
Expand Down Expand Up @@ -124,6 +126,8 @@ Type: Story export

Specifies which story is rendered by the `Story` block. If no `of` is defined and the MDX file is [attached](./doc-block-meta.md#attached-vs-unattached), the primary (first) story will be rendered.

<YouTubeCallout id="uAA1JvLcl-w" title="Avoid Documentation Nightmares with Storybook's Story Doc Block configuration" params='start=160' />

### `args`

(⛔️ **Deprecated**)
Expand Down
2 changes: 2 additions & 0 deletions docs/api/doc-block-subtitle.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
title: 'Subtitle'
---

<YouTubeCallout id="uAA1JvLcl-w" title="Avoid Documentation Nightmares with Storybook's Subtitle Doc Block" params='start=98' />

The `Subtitle` block can serve as a secondary heading for your docs entry.

![Screenshot of Subtitle block](./doc-block-title-subtitle-description.png)
Expand Down
2 changes: 2 additions & 0 deletions docs/api/doc-block-title.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
title: 'Title'
---

<YouTubeCallout id="uAA1JvLcl-w" title="Avoid Documentation Nightmares with Storybook's Title Doc Block" params='start=57' />

The `Title` block serves as the primary heading for your docs entry. It is typically used to provide the component or page name.

![Screenshot of Title block](./doc-block-title-subtitle-description.png)
Expand Down
2 changes: 2 additions & 0 deletions docs/sharing/embed.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
title: 'Embed stories'
---

<YouTubeCallout id="2tqRpBcV8ug" title="Your Storybook EVERYWHERE | Embeds with Chromatic" />

Embed stories to showcase your work to teammates and the developer community at large. In order to use embeds, your Storybook must be published and publicly accessible.

Storybook supports `<iframe>` embeds out of the box. If you use Chromatic to [publish Storybook](./publish-storybook.md#publish-storybook-with-chromatic), you can also embed stories in Notion, Medium, and countless other platforms that support the oEmbed standard.
Expand Down
2 changes: 2 additions & 0 deletions docs/sharing/publish-storybook.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
title: 'Publish Storybook'
---

<YouTubeCallout id="zhrboql8UuU" title="How to Test UI AUTOMATICALLY — Storybook and Chromatic" />

Teams publish Storybook online to review and collaborate on works in progress. That allows developers, designers, PMs, and other stakeholders to check if the UI looks right without touching code or requiring a local dev environment.

<video autoPlay muted playsInline loop>
Expand Down
4 changes: 3 additions & 1 deletion docs/writing-docs/autodocs.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ By default, Storybook offers zero-config support for documentation and automatic

### Write a custom template

To replace the default documentation template used by Storybook, you can extend your UI configuration file (i.e., `.storybook/preview.js`) and introduce a `docs` [parameter](./doc-blocks.md#customizing-the-automatic-docs-page). This parameter accepts a `page` function that returns a React component, which you can use to generate the required template. For example:
<YouTubeCallout id="q8SY4yyNE6Q" title="Custom Autodocs with Storybook 7 Docs Page | Quick Tips" />

To replace the default documentation template used by Storybook, you can extend your UI configuration file (i.e., `.storybook/preview.js|ts`) and introduce a `docs` [parameter](./doc-blocks.md#customizing-the-automatic-docs-page). This parameter accepts a `page` function that returns a React component, which you can use to generate the required template. For example:

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

Expand Down
2 changes: 2 additions & 0 deletions docs/writing-docs/doc-blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
title: Doc blocks
---

<YouTubeCallout id="uAA1JvLcl-w" title="Avoid Documentation Nightmares with Storybook Doc Blocks" />

Storybook offers several doc blocks to help document your components and other aspects of your project.

There are two common ways to use doc blocks in Storybook, within MDX and as part of the docs page template.
Expand Down

0 comments on commit af906e2

Please sign in to comment.