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
docs(storybook): fix crash when Reactist tooltip is triggered in the Storybook frame (#1080)
* docs(storybook): rework figma & badges toolbar with manager-native components
Co-Authored-By: Claude <noreply@anthropic.com>
* docs(storybook): stop flagging non-visual pages as missing a Figma link
Co-Authored-By: Claude <noreply@anthropic.com>
* docs(storybook): consolidate Modal docs into a single entry
Co-Authored-By: Claude <noreply@anthropic.com>
* docs(storybook): remove horizontal margin from toolbar badge group
Co-Authored-By: Claude <noreply@anthropic.com>
* docs(storybook): drop BadgeGroup wrapper in favor of an inline container
Co-Authored-By: Claude <noreply@anthropic.com>
* docs(storybook): document the figma & badges toolbar tools
Co-Authored-By: Claude <noreply@anthropic.com>
* docs(storybook): map storybook/internal/components in the React 18 tsconfig
Co-Authored-By: Claude <noreply@anthropic.com>
* docs(storybook): scaffold without a placeholder Figma link, default badge to notAccessible
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
Allows adding a toolbar badge (or badges) for the current story, used to flag things viewers should know at a glance, e.g. a component's accessibility status or deprecation.
4
+
5
+
## Usage
6
+
7
+
Set the `badges` parameter on the component's CSF `meta`:
8
+
9
+
```ts
10
+
const meta = {
11
+
title: '📝 Form/CheckboxField',
12
+
component: CheckboxField,
13
+
parameters: {
14
+
badges: ['accessible'],
15
+
},
16
+
}
17
+
```
18
+
19
+
You can list more than one key:
20
+
21
+
```ts
22
+
badges: ['partiallyAccessible', 'deprecated']
23
+
```
24
+
25
+
### MDX docs
26
+
27
+
Badges come from the story parameters, so an MDX docs page inherits them when it is **attached** to a stories file via `<Meta of={ComponentStories} />`. Storybook will **drop** parameters set directly on a standalone `<Meta title="…" />` (i.e. no `of`).
Allows adding a toolbar link from the current story to its Figma design, so anyone can jump to the source of truth at a glance. When no design is linked, a neutral "No Figma link" hint shows as a reminder to add one.
4
+
5
+
## Usage
6
+
7
+
Set the `figma` parameter on the component's CSF `meta`. Provide the design's `url`, plus an optional `path` breadcrumb shown as the link's tooltip:
A Figma link comes from the story parameters, so an MDX docs page inherits it when it is **attached** to a stories file via `<Meta of={ComponentStories} />`. Storybook will **drop** parameters set directly on a standalone `<Meta title="…" />` (i.e. no `of`). Standalone documentation pages not attached to stories (e.g. the intro and Tips & tricks pages) will never show the "No Figma link" hint.
34
+
35
+
## Opting out
36
+
37
+
Non-visual entries (behaviour utilities, hooks) have no Figma design and shouldn't be flagged. Mark them with `FIGMA_NOT_NEEDED` to hide the hint:
0 commit comments