Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Addon designs updates for 7.0 #23360

Merged
merged 1 commit into from
Jul 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions docs/sharing/design-integrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,19 +75,14 @@ Run the following command to install the addon.

<!-- prettier-ignore-end -->

<div class="aside">

ℹ️ This addon is still being converted to fully support Storybook 7.0. If you're adding this addon to a Storybook 7.0 instance or migrating from a previous version, you must install the `beta` version.

</div>

Update your Storybook configuration (in `.storybook/main.js|ts`) to include the addon.

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

<CodeSnippets
paths={[
'common/storybook-main-figma-addon-register.js.mdx',
'common/storybook-main-figma-addon-register.ts.mdx',
]}
/>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
```shell
npm install --save-dev storybook-addon-designs@beta
npm install --save-dev @storybook/addon-designs
```
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
```shell
pnpm add --save-dev storybook-addon-designs@beta
pnpm add --save-dev @storybook/addon-designs
```
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
```shell
yarn add --dev storybook-addon-designs@beta
yarn add --dev @storybook/addon-designs
```
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
```js
// .storybook/main.js|ts
// .storybook/main.js

export default {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
// Other Storybook addons
'storybook-addon-designs', // 👈 Addon is registered here
'@storybook/addon-designs', // 👈 Addon is registered here
],
};
```
17 changes: 17 additions & 0 deletions docs/snippets/common/storybook-main-figma-addon-register.ts.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
```ts
// .storybook/main.ts

// Replace your-framework with the framework you are using (e.g., react-webpack5, vue3-vite)
import type { StorybookConfig } from '@storybook/your-framework';

const config: StorybookConfig = {
framework: '@storybook/your-framework',
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
// Other Storybook addons
'@storybook/addon-designs', // 👈 Addon is registered here
],
};

export default config;
```