You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/api/csf/index.mdx
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ tab:
9
9
title: CSF 3
10
10
---
11
11
12
-
Component Story Format (CSF) is the recommended way to [write stories](../writing-stories/index.mdx). It's an [open standard](https://github.com/ComponentDriven/csf) based on ES6 modules that is portable beyond Storybook.
12
+
Component Story Format (CSF) is the recommended way to [write stories](../../writing-stories/index.mdx). It's an [open standard](https://github.com/ComponentDriven/csf) based on ES6 modules that is portable beyond Storybook.
13
13
14
14
<Calloutvariant="info"icon="💡">
15
15
If you have stories written in the older `storiesOf()` syntax, it was removed in Storybook 8.0 and is no longer maintained. We recommend migrating your stories to CSF. See the [migration guide](../../migration-guide/index.mdx#major-breaking-changes) for more information.
@@ -19,7 +19,7 @@ In CSF, stories and component metadata are defined as ES Modules. Every componen
19
19
20
20
## Default export
21
21
22
-
The default export defines metadata about your component, including the `component` itself, its `title` (where it will show up in the [navigation UI story hierarchy](../writing-stories/naming-components-and-hierarchy.mdx#sorting-stories)), [decorators](../writing-stories/decorators.mdx), and [parameters](../writing-stories/parameters.mdx).
22
+
The default export defines metadata about your component, including the `component` itself, its `title` (where it will show up in the [navigation UI story hierarchy](../../writing-stories/naming-components-and-hierarchy.mdx#sorting-stories)), [decorators](../../writing-stories/decorators.mdx), and [parameters](../../writing-stories/parameters.mdx).
23
23
24
24
The `component` field is required and used by addons for automatic prop table generation and display of other component metadata. The `title` field is optional and should be unique (i.e., not re-used across files).
25
25
@@ -29,7 +29,7 @@ The `component` field is required and used by addons for automatic prop table ge
29
29
30
30
{/* prettier-ignore-end */}
31
31
32
-
For more examples, see [writing stories](../writing-stories/index.mdx).
32
+
For more examples, see [writing stories](../../writing-stories/index.mdx).
33
33
34
34
## Named story exports
35
35
@@ -53,7 +53,7 @@ The exported identifiers will be converted to "start case" using Lodash's [start
53
53
54
54
We recommend that all export names to start with a capital letter.
55
55
56
-
Story objects can be annotated with a few different fields to define story-level [decorators](../writing-stories/decorators.mdx) and [parameters](../writing-stories/parameters.mdx), and also to define the `name` of the story.
56
+
Story objects can be annotated with a few different fields to define story-level [decorators](../../writing-stories/decorators.mdx) and [parameters](../../writing-stories/parameters.mdx), and also to define the `name` of the story.
57
57
58
58
Storybook's `name` configuration element is helpful in specific circumstances. Common use cases are names with special characters or Javascript restricted words. If not specified, Storybook defaults to the named export.
59
59
@@ -67,7 +67,7 @@ Storybook's `name` configuration element is helpful in specific circumstances. C
67
67
68
68
Starting in SB 6.0, stories accept named inputs called Args. Args are dynamic data that are provided (and possibly updated by) Storybook and its addons.
69
69
70
-
Consider Storybook’s ["Button" example](../writing-stories/index.mdx#defining-stories) of a text button that logs its click events:
70
+
Consider Storybook’s ["Button" example](../../writing-stories/index.mdx#defining-stories) of a text button that logs its click events:
71
71
72
72
{/* prettier-ignore-start */}
73
73
@@ -93,7 +93,7 @@ Or even more simply:
93
93
94
94
Not only are these versions shorter and more accessible to write than their no-args counterparts, but they are also more portable since the code doesn't depend on the actions addon specifically.
95
95
96
-
For more information on setting up [Docs](../writing-docs/index.mdx) and [Actions](../essentials/actions.mdx), see their respective documentation.
96
+
For more information on setting up [Docs](../../writing-docs/index.mdx) and [Actions](../../essentials/actions.mdx), see their respective documentation.
You can still specify a title like in CSF 2, but if you don't specify one, it can be inferred from the story's path on disk. For more information, see the section on [configuring story loading](../configure/index.mdx#configure-story-loading).
284
+
You can still specify a title like in CSF 2, but if you don't specify one, it can be inferred from the story's path on disk. For more information, see the section on [configuring story loading](../../configure/index.mdx#configure-story-loading).
0 commit comments