diff --git a/src/addons.ts b/src/addons.ts index b4802e7..aecbe7a 100644 --- a/src/addons.ts +++ b/src/addons.ts @@ -1,4 +1,3 @@ require('@storybook/addon-knobs/register'); require('@storybook/addon-actions/register'); require('@storybook/addon-links/register'); -require('@storybook/addon-options/register'); diff --git a/src/config.ts b/src/config.ts index ba6f28b..68e835e 100644 --- a/src/config.ts +++ b/src/config.ts @@ -1,19 +1,27 @@ -import { withOptions } from '@storybook/addon-options'; -import { addDecorator, configure } from '@storybook/react'; +import { addParameters, configure } from '@storybook/react'; +import { create } from '@storybook/theming'; -addDecorator( - withOptions({ - name: pkg.name || 'Stoplight UI-Kit', - url: pkg.url || 'https://github.com/stoplightio/ui-kit', - goFullScreen: false, - showStoriesPanel: true, - showAddonPanel: true, +// This is kinda fragile as it makes the assumptions that it is installed in +// the top-level node_modules of the root project. +const pkg = require('../../../package.json'); + +addParameters({ + options: { + isFullScreen: false, + showNav: true, + showPanel: true, showSearchBox: false, - addonPanelInRight: true, + panelPosition: 'right', sortStoriesByKind: true, selectedAddonPanel: undefined, - }) -); + theme: create({ + base: 'light', + + brandTitle: pkg.name, + brandUrl: pkg.repository.url, + }), + }, +}); function loadStories() { require('@project/stories');