Skip to content

Commit

Permalink
fix: update deprecated config options (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
billiegoose authored and P0lip committed May 31, 2019
1 parent 6b1d9de commit 682f040
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 13 deletions.
1 change: 0 additions & 1 deletion src/addons.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
require('@storybook/addon-knobs/register');
require('@storybook/addon-actions/register');
require('@storybook/addon-links/register');
require('@storybook/addon-options/register');
32 changes: 20 additions & 12 deletions src/config.ts
Original file line number Diff line number Diff line change
@@ -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');
Expand Down

0 comments on commit 682f040

Please sign in to comment.