UNPKG

873 BJavaScriptView Raw
1import React from 'react';
2import { addons, types } from '@storybook/addons';
3import { ADDON_ID, PANEL_ID, PARAM_KEY } from './constants';
4import { VisionSimulator } from './components/VisionSimulator';
5import { A11YPanel } from './components/A11YPanel';
6import { A11yContextProvider } from './components/A11yContext';
7addons.register(ADDON_ID, () => {
8 addons.add(PANEL_ID, {
9 title: '',
10 type: types.TOOL,
11 match: ({
12 viewMode
13 }) => viewMode === 'story',
14 render: () => /*#__PURE__*/React.createElement(VisionSimulator, null)
15 });
16 addons.add(PANEL_ID, {
17 title: 'Accessibility',
18 type: types.PANEL,
19 render: ({
20 active = true,
21 key
22 }) => /*#__PURE__*/React.createElement(A11yContextProvider, {
23 key: key,
24 active: active
25 }, /*#__PURE__*/React.createElement(A11YPanel, null)),
26 paramKey: PARAM_KEY
27 });
28});
\No newline at end of file