2019-10-12 18:15:39 +02:00
|
|
|
import { document, setTimeout } from 'global';
|
|
|
|
import { html } from 'lit-html';
|
|
|
|
|
|
|
|
const text = 'Testing the a11y addon';
|
|
|
|
|
|
|
|
export default {
|
2019-11-13 18:29:23 +08:00
|
|
|
title: 'Addons/a11y',
|
2019-10-12 18:15:39 +02:00
|
|
|
parameters: {
|
|
|
|
options: { selectedPanel: 'storybook/a11y/panel' },
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2020-03-27 20:04:50 +01:00
|
|
|
export const Default = () => html` <button></button> `;
|
|
|
|
export const Label = () => html` <button>${text}</button> `;
|
|
|
|
export const Disabled = () => html` <button disabled>${text}</button> `;
|
2019-11-19 21:08:32 +01:00
|
|
|
export const Story4 = () => html`
|
2019-10-12 18:15:39 +02:00
|
|
|
<button style="color: black; background-color: brown;">${text}</button>
|
|
|
|
`;
|
2020-05-25 13:32:05 +08:00
|
|
|
Story4.storyName = 'Invalid contrast';
|
2019-10-12 18:15:39 +02:00
|
|
|
|
2019-11-19 21:08:32 +01:00
|
|
|
export const Story5 = () => {
|
2019-10-12 18:15:39 +02:00
|
|
|
const div = document.createElement('div');
|
|
|
|
setTimeout(() => {
|
|
|
|
div.innerHTML = `<button>This button has a delayed render of 1s</button>`;
|
|
|
|
}, 1000);
|
|
|
|
return div;
|
|
|
|
};
|
2020-05-25 13:32:05 +08:00
|
|
|
Story5.storyName = 'Delayed render';
|