From b4f1a201455f2d77467eb87eefd6882ee12946b2 Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Wed, 11 Mar 2020 09:35:00 +0800 Subject: [PATCH] Fix svelte example? --- addons/docs/src/frameworks/svelte/config.js | 8 -------- addons/docs/svelte/config.js | 1 - addons/docs/svelte/index.js | 1 - addons/docs/svelte/preset.js | 1 - examples/svelte-kitchen-sink/.storybook/main.js | 6 ++++++ examples/svelte-kitchen-sink/.storybook/presets.js | 1 - .../src/stories/addon-docs.stories.mdx | 8 +++++--- 7 files changed, 11 insertions(+), 15 deletions(-) delete mode 100644 addons/docs/src/frameworks/svelte/config.js delete mode 100644 addons/docs/svelte/config.js delete mode 100644 addons/docs/svelte/index.js delete mode 100644 addons/docs/svelte/preset.js delete mode 100644 examples/svelte-kitchen-sink/.storybook/presets.js diff --git a/addons/docs/src/frameworks/svelte/config.js b/addons/docs/src/frameworks/svelte/config.js deleted file mode 100644 index e44357a5cc2..00000000000 --- a/addons/docs/src/frameworks/svelte/config.js +++ /dev/null @@ -1,8 +0,0 @@ -/* eslint-disable import/no-extraneous-dependencies */ -import { addParameters } from '@storybook/svelte'; -import { DocsPage, DocsContainer } from '@storybook/addon-docs/blocks'; - -addParameters({ - docsContainer: DocsContainer, - docs: DocsPage, -}); diff --git a/addons/docs/svelte/config.js b/addons/docs/svelte/config.js deleted file mode 100644 index 1dbed01d093..00000000000 --- a/addons/docs/svelte/config.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('../dist/frameworks/svelte/config'); diff --git a/addons/docs/svelte/index.js b/addons/docs/svelte/index.js deleted file mode 100644 index 135f6edf232..00000000000 --- a/addons/docs/svelte/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('../dist/frameworks/common/index'); diff --git a/addons/docs/svelte/preset.js b/addons/docs/svelte/preset.js deleted file mode 100644 index 913ef1222a0..00000000000 --- a/addons/docs/svelte/preset.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('../dist/frameworks/common/makePreset').default('svelte'); diff --git a/examples/svelte-kitchen-sink/.storybook/main.js b/examples/svelte-kitchen-sink/.storybook/main.js index 2f3f49da9ad..de958c60c99 100644 --- a/examples/svelte-kitchen-sink/.storybook/main.js +++ b/examples/svelte-kitchen-sink/.storybook/main.js @@ -5,6 +5,12 @@ module.exports = { addons: [ '@storybook/addon-storysource', '@storybook/addon-actions', + { + name: '@storybook/addon-docs', + options: { + configureJSX: true, + }, + }, '@storybook/addon-links', '@storybook/addon-knobs', '@storybook/addon-backgrounds', diff --git a/examples/svelte-kitchen-sink/.storybook/presets.js b/examples/svelte-kitchen-sink/.storybook/presets.js deleted file mode 100644 index 479bad11a41..00000000000 --- a/examples/svelte-kitchen-sink/.storybook/presets.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = ['@storybook/addon-docs/svelte/preset']; diff --git a/examples/svelte-kitchen-sink/src/stories/addon-docs.stories.mdx b/examples/svelte-kitchen-sink/src/stories/addon-docs.stories.mdx index 2fb6e04cdcb..ddbbb014395 100644 --- a/examples/svelte-kitchen-sink/src/stories/addon-docs.stories.mdx +++ b/examples/svelte-kitchen-sink/src/stories/addon-docs.stories.mdx @@ -15,7 +15,7 @@ How you like them apples?! Just like in React, we first declare our component. - + ## CSF stories @@ -41,7 +41,7 @@ export const square = () => ({ ## MDX stories -Amd here's how it looks in MDX: +Amd here's how `rounded` looks in MDX: {{ @@ -53,6 +53,8 @@ Amd here's how it looks in MDX: }} +And `square`: + {{ Component: ButtonView, @@ -65,7 +67,7 @@ Amd here's how it looks in MDX: ## More info -For more info, check out the [Storybook Docs Technical Preview](https://docs.google.com/document/d/1un6YX7xDKEKl5-MVb-egnOYN8dynb5Hf7mq0hipk8JE/edit?usp=sharing). +For more info, check out the [Storybook Docs README](https://github.com/storybookjs/storybook/tree/next/addons/docs). We want your feedback to help make this more useful.