import { document, setTimeout } from 'global'; import { storiesOf } from '@storybook/html'; import { setOptions } from '@storybook/addon-options'; import { checkA11y } from '@storybook/addon-a11y/html'; const text = 'Testing the a11y addon'; storiesOf('Addons|a11y', module) .addDecorator(checkA11y) .addDecorator(fn => { setOptions({ selectedAddonPanel: '@storybook/addon-a11y/panel' }); return fn(); }) .add('Default', () => ``) .add('Label', () => ``) .add('Disabled', () => ``) .add( 'Invalid contrast', () => `` ) .add('Delayed render', () => { const div = document.createElement('div'); setTimeout(() => { div.innerHTML = ``; }, 1000); return div; });