1 | import React from 'react';
|
2 | import { addons, types } from '@storybook/addons';
|
3 | import { ADDON_ID, PANEL_ID, PARAM_KEY } from './constants';
|
4 | import { VisionSimulator } from './components/VisionSimulator';
|
5 | import { A11YPanel } from './components/A11YPanel';
|
6 | import { A11yContextProvider } from './components/A11yContext';
|
7 | addons.register(ADDON_ID, () => {
|
8 | addons.add(PANEL_ID, {
|
9 | title: '',
|
10 | type: types.TOOL,
|
11 | match: ({
|
12 | viewMode
|
13 | }) => viewMode === 'story',
|
14 | render: () => 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 | }) => React.createElement(A11yContextProvider, {
|
23 | key: key,
|
24 | active: active
|
25 | }, React.createElement(A11YPanel, null)),
|
26 | paramKey: PARAM_KEY
|
27 | });
|
28 | }); |
\ | No newline at end of file |