diff --git a/.storybook/addons.js b/.storybook/addons.js index 810dc73559..2783f324e3 100644 --- a/.storybook/addons.js +++ b/.storybook/addons.js @@ -1,4 +1,3 @@ import 'storybook-readme/register'; import '@storybook/addon-options/register'; -import '@storybook/addon-knobs/register' -import '@storybook/addon-viewport/register' +import '@storybook/addon-knobs/register'; diff --git a/.storybook/config.js b/.storybook/config.js index 2698d02326..a3a9c1d713 100644 --- a/.storybook/config.js +++ b/.storybook/config.js @@ -3,19 +3,20 @@ import { configure, addDecorator } from '@storybook/react'; import { setOptions } from '@storybook/addon-options'; import styledNormalize from 'styled-normalize'; import { createGlobalStyle } from 'styled-components'; +import { + AMP_SCRIPT, + AMP_NO_SCRIPT, +} from '@bbc/psammead-assets/amp-boilerplate'; +import Helmet from 'react-helmet'; -// Option defaults: setOptions({ name: 'BBC Psammead', url: 'https:github.com/BBC-News/psammead', addonPanelInRight: true, sidebarAnimations: true, + sortStoriesByKind: true, }); -function loadStories() { - require('glob-loader!./stories.pattern'); -} - const GlobalStyle = createGlobalStyle` ${styledNormalize} @@ -51,4 +52,22 @@ addDecorator(story => ( )); -configure(loadStories, module); +export const ampDecorator = story => ( + + + + + + + +