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
Thanks to this approach, we can directly use primitives in the story arguments instead of a view model object.
227
234
235
+
> [!IMPORTANT]
236
+
> Three requirements must be met for snapshot field documentation to appear in Storybook's ArgTypes table:
237
+
>
238
+
> 1.**Named wrapper variable** — the wrapper must be assigned to a named `const` (e.g. `MyComponentViewWrapperImpl`) before being passed to `withViewDocs`, so that `react-docgen-typescript` can extract its props.
239
+
> 2.**`withViewDocs` call** — wraps the wrapper component with the original View to copy the View's JSDoc description.
240
+
> 3.**`satisfies Meta`** — the meta object must use `satisfies Meta<...>` (not `as Meta<...>` or `: Meta<...> =`). Type assertions and annotations erase the inferred component type that docgen relies on.
241
+
228
242
#### Linking Figma Designs
229
243
230
244
This package uses [@storybook/addon-designs](https://github.com/storybookjs/addon-designs) to embed Figma designs directly in Storybook. This helps developers compare their implementation with the design specs.
@@ -239,7 +253,7 @@ This package uses [@storybook/addon-designs](https://github.com/storybookjs/addo
0 commit comments