import 'focus-visible'; import React from 'react'; import {ThemeProvider} from 'emotion-theming'; import {create} from '@storybook/theming/create'; import { addParameters, configure, setAddon, getStorybook, addDecorator, } from '@storybook/react'; import {withInfo} from '@storybook/addon-info'; import {setOptions} from '@storybook/addon-options'; import theme from '../src/sentry/static/sentry/app/utils/theme'; import '../docs-ui/index.js'; const withTheme = storyFn => {storyFn()}; addDecorator(withTheme); // Option defaults: addParameters({ options: { /** * show story component as full screen * @type {Boolean} */ isFullscreen: false, /** * display panel that shows a list of stories * @type {Boolean} */ showNav: true, /** * display panel that shows addon configurations * @type {Boolean} */ showPanel: true, /** * where to show the addon panel * @type {('bottom'|'right')} */ panelPosition: 'bottom', /** * regex for finding the hierarchy separator * @example: * null - turn off hierarchy * /\// - split by `/` * /\./ - split by `.` * /\/|\./ - split by `/` or `.` * @type {Regex} */ hierarchySeparator: /\/|\./, /** * regex for finding the hierarchy root separator * @example: * null - turn off multiple hierarchy roots * /\|/ - split by `|` * @type {Regex} */ hierarchyRootSeparator: /\|/, /** * sidebar tree animat * ions * @type {Boolean} */ sidebarAnimations: true, /** * enable/disable shortcuts * @type {Boolean} */ enableShortcuts: true, /** * show/hide tool bar * @type {Boolean} */ isToolshown: true, /** * function to sort stories in the tree view * common use is alphabetical `(a, b) => a[1].id.localeCompare(b[1].id)` * if left undefined, then the order in which the stories are imported will * be the order they display * @type {Function} */ storySort: undefined, }, });