Skip to content

Commit

Permalink
Change all examples to use addon-a11y preset.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Cross committed Jan 31, 2020
1 parent 8f3834a commit 2b12a15
Show file tree
Hide file tree
Showing 30 changed files with 14 additions and 59 deletions.
2 changes: 1 addition & 1 deletion examples/angular-cli/.storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ module.exports = {
'@storybook/addon-options',
'@storybook/addon-jest',
'@storybook/addon-backgrounds',
'@storybook/addon-a11y',
'@storybook/addon-a11y/preset',
],
};
2 changes: 0 additions & 2 deletions examples/angular-cli/.storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { addParameters, addDecorator } from '@storybook/angular';
import { withA11y } from '@storybook/addon-a11y';
import { setCompodocJson } from '@storybook/addon-docs/angular';
import addCssWarning from '../src/cssWarning';

Expand All @@ -9,7 +8,6 @@ import docJson from '../documentation.json';

setCompodocJson(docJson);

addDecorator(withA11y);
addCssWarning();

addParameters({
Expand Down
2 changes: 1 addition & 1 deletion examples/cra-kitchen-sink/.storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = {
'@storybook/addon-options',
'@storybook/addon-knobs',
'@storybook/addon-backgrounds',
'@storybook/addon-a11y',
'@storybook/addon-a11y/preset',
'@storybook/addon-jest',
],
stories: ['../src/stories/**/*.stories.(js|mdx)'],
Expand Down
2 changes: 0 additions & 2 deletions examples/cra-kitchen-sink/.storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { addParameters, addDecorator } from '@storybook/react';
import { withA11y } from '@storybook/addon-a11y';

addDecorator(withA11y);
addParameters({
options: {
storySort: (a, b) =>
Expand Down
2 changes: 1 addition & 1 deletion examples/cra-ts-kitchen-sink/.storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ module.exports = {
'@storybook/addon-docs',
'@storybook/addon-actions',
'@storybook/addon-links',
'@storybook/addon-a11y',
'@storybook/addon-a11y/preset',
],
};
2 changes: 0 additions & 2 deletions examples/cra-ts-kitchen-sink/.storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { addParameters, addDecorator } from '@storybook/react';
import { withA11y } from '@storybook/addon-a11y';
import { withKnobs } from '@storybook/addon-knobs';

addDecorator(withKnobs);
addDecorator(withA11y);
addParameters({
options: {
brandTitle: 'CRA TypeScript Kitchen Sink',
Expand Down
2 changes: 1 addition & 1 deletion examples/ember-cli/.storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const path = require('path');

module.exports = {
addons: [
'@storybook/addon-a11y',
'@storybook/addon-a11y/preset',
'@storybook/addon-storysource',
'@storybook/addon-actions',
'@storybook/addon-docs',
Expand Down
2 changes: 0 additions & 2 deletions examples/ember-cli/.storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import { addParameters, addDecorator } from '@storybook/ember';
import { setJSONDoc } from '@storybook/addon-docs/ember';
import { withA11y } from '@storybook/addon-a11y';
// eslint-disable-next-line import/no-unresolved
import docJson from '../ember-output/storybook-docgen/index.json';

setJSONDoc(docJson);
addDecorator(withA11y);
addParameters({
options: {
showRoots: true,
Expand Down
2 changes: 1 addition & 1 deletion examples/html-kitchen-sink/.storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module.exports = {
stories: [`${__dirname}/../stories/*.stories.*`],
addons: [
'@storybook/addon-docs',
'@storybook/addon-a11y',
'@storybook/addon-a11y/preset',
'@storybook/addon-actions',
'@storybook/addon-backgrounds',
'@storybook/addon-events',
Expand Down
3 changes: 0 additions & 3 deletions examples/html-kitchen-sink/.storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import { addParameters, addDecorator } from '@storybook/html';
import { withA11y } from '@storybook/addon-a11y';

addDecorator(withA11y);

addParameters({
a11y: {
Expand Down
2 changes: 0 additions & 2 deletions examples/html-kitchen-sink/stories/addon-a11y.stories.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import { document, setTimeout } from 'global';
import { withA11y } from '@storybook/addon-a11y';

const text = 'Testing the a11y addon';

export default {
title: 'Addons/a11y',
decorators: [withA11y],
parameters: {
options: { selectedPanel: 'storybook/a11y/panel' },
},
Expand Down
2 changes: 1 addition & 1 deletion examples/marko-cli/.storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = {
'@storybook/addon-actions',
'@storybook/addon-knobs',
'@storybook/addon-options',
'@storybook/addon-a11y',
'@storybook/addon-a11y/preset',
],
webpackFinal: async config => {
config.module.rules.push({
Expand Down
4 changes: 0 additions & 4 deletions examples/marko-cli/.storybook/preview.js

This file was deleted.

2 changes: 1 addition & 1 deletion examples/mithril-kitchen-sink/.storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = {
'@storybook/addon-viewport',
'@storybook/addon-options',
'@storybook/addon-backgrounds',
'@storybook/addon-a11y',
'@storybook/addon-a11y/preset',
],
webpackFinal: async config => {
config.module.rules.push({
Expand Down
4 changes: 0 additions & 4 deletions examples/mithril-kitchen-sink/.storybook/preview.js

This file was deleted.

2 changes: 1 addition & 1 deletion examples/official-storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module.exports = {
'@storybook/addon-knobs',
'@storybook/addon-cssresources',
'@storybook/addon-backgrounds',
'@storybook/addon-a11y',
'@storybook/addon-a11y/preset',
'@storybook/addon-jest',
'@storybook/addon-viewport',
'@storybook/addon-graphql',
Expand Down
2 changes: 0 additions & 2 deletions examples/official-storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React from 'react';
import { addDecorator, addParameters } from '@storybook/react';
import { Global, ThemeProvider, themes, createReset, convert } from '@storybook/theming';
import { withCssResources } from '@storybook/addon-cssresources';
import { withA11y } from '@storybook/addon-a11y';
import { withNotes } from '@storybook/addon-notes';
import { DocsPage } from '@storybook/addon-docs/blocks';

Expand All @@ -26,7 +25,6 @@ addHeadWarning('preview-head-not-loaded', 'Preview head not loaded');
addHeadWarning('dotenv-file-not-loaded', 'Dotenv file not loaded');

addDecorator(withCssResources);
addDecorator(withA11y);
addDecorator(withNotes);

addDecorator(storyFn => (
Expand Down
2 changes: 1 addition & 1 deletion examples/preact-kitchen-sink/.storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module.exports = {
'@storybook/addon-options',
'@storybook/addon-backgrounds',
'@storybook/addon-contexts',
'@storybook/addon-a11y',
'@storybook/addon-a11y/preset',
],
webpackFinal: config => {
config.module.rules.push({
Expand Down
5 changes: 0 additions & 5 deletions examples/preact-kitchen-sink/.storybook/preview.js

This file was deleted.

2 changes: 1 addition & 1 deletion examples/rax-kitchen-sink/.storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = {
'@storybook/addon-options',
'@storybook/addon-knobs',
'@storybook/addon-backgrounds',
'@storybook/addon-a11y',
'@storybook/addon-a11y/preset',
'@storybook/addon-jest',
],
webpackFinal: async config => ({
Expand Down
2 changes: 0 additions & 2 deletions examples/rax-kitchen-sink/src/stories/addon-a11y.stories.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import { createElement } from 'rax';
import { withA11Y } from '@storybook/addon-a11y';
import Text from 'rax-text';
import View from 'rax-view';
import markdown from './note.md';

export default {
title: 'Addon/addon-a11y',
decorators: [withA11Y],
};

export const Basic = () => <Text>RAX TEXT NODE</Text>;
Expand Down
2 changes: 1 addition & 1 deletion examples/riot-kitchen-sink/.storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = {
'@storybook/addon-viewport',
'@storybook/addon-options',
'@storybook/addon-backgrounds',
'@storybook/addon-a11y',
'@storybook/addon-a11y/preset',
],
webpackFinal: async config => {
config.module.rules.push({
Expand Down
4 changes: 0 additions & 4 deletions examples/riot-kitchen-sink/.storybook/preview.js

This file was deleted.

2 changes: 1 addition & 1 deletion examples/svelte-kitchen-sink/.storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = {
'@storybook/addon-backgrounds',
'@storybook/addon-viewport',
'@storybook/addon-options',
'@storybook/addon-a11y',
'@storybook/addon-a11y/preset',
],
webpackFinal: async config => {
config.module.rules.push({
Expand Down
4 changes: 0 additions & 4 deletions examples/svelte-kitchen-sink/.storybook/preview.js

This file was deleted.

2 changes: 1 addition & 1 deletion examples/vue-kitchen-sink/.storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = {
'@storybook/addon-viewport',
'@storybook/addon-options',
'@storybook/addon-backgrounds',
'@storybook/addon-a11y',
'@storybook/addon-a11y/preset',
'@storybook/addon-contexts',
],
};
2 changes: 0 additions & 2 deletions examples/vue-kitchen-sink/.storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import { addParameters, addDecorator } from '@storybook/vue';
import Vue from 'vue';
import Vuex from 'vuex';
import { withA11y } from '@storybook/addon-a11y';

import MyButton from '../src/stories/Button.vue';

addDecorator(withA11y);
Vue.component('my-button', MyButton);
Vue.use(Vuex);

Expand Down
2 changes: 1 addition & 1 deletion examples/web-components-kitchen-sink/.storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
addons: [
'@storybook/addon-docs',
'@storybook/addon-a11y',
'@storybook/addon-a11y/preset',
'@storybook/addon-actions',
'@storybook/addon-backgrounds',
'@storybook/addon-knobs',
Expand Down
3 changes: 0 additions & 3 deletions examples/web-components-kitchen-sink/.storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,11 @@ import {
addDecorator,
setCustomElements,
} from '@storybook/web-components';
import { withA11y } from '@storybook/addon-a11y';

import customElements from '../custom-elements.json';

setCustomElements(customElements);

addDecorator(withA11y);

addParameters({
a11y: {
config: {},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import { document, setTimeout } from 'global';
import { withA11y } from '@storybook/addon-a11y';
import { html } from 'lit-html';

const text = 'Testing the a11y addon';

export default {
title: 'Addons/a11y',
decorators: [withA11y],
parameters: {
options: { selectedPanel: 'storybook/a11y/panel' },
},
Expand Down

0 comments on commit 2b12a15

Please sign in to comment.