import React from 'react' import { addons, types } from '@storybook/manager-api' import { FORCE_RE_RENDER } from '@storybook/core-events' addons.register('my/toolbar', () => { addons.add('my-toolbar-addon/toolbar', { title: 'Example Storybook toolbar', //👇 Sets the type of UI element in Storybook type: types.TOOL, //👇 Shows the Toolbar UI element if either the Canvas or Docs tab is active match: ({ viewMode }) => !!(viewMode && viewMode.match(/^(story|docs)$/)), render: ({ active }) => { const defaultTheme = window.localStorage.getItem('__ls-theme-color__') return (
) }, }) })