mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 07:52:07 +08:00
11 KiB
11 KiB
import type { Meta } from '@storybook/angular';
import { MyComponent } from './MyComponent';
const meta: Meta<MyComponent> = {
component: MyComponent,
parameters: {
a11y: {
// Optional selector to inspect
element: '#storybook-root',
config: {
rules: [
{
// The autocomplete rule will not run based on the CSS selector provided
id: 'autocomplete-valid',
selector: '*:not([autocomplete="nope"])',
},
{
// Setting the enabled option to false will disable checks for this particular rule on all stories.
id: 'image-alt',
enabled: false,
},
],
},
options: {},
},
},
globals: {
a11y: {
manual: true,
},
},
};
export default meta;
<script module>
import { defineMeta } from '@storybook/addon-svelte-csf';
import MyComponent from './MyComponent.svelte';
const { Story } = defineMeta({
component: MyComponent,
parameters: {
a11y: {
// Optional selector to inspect
element: '#storybook-root',
config: {
rules: [
{
// The autocomplete rule will not run based on the CSS selector provided
id: 'autocomplete-valid',
selector: '*:not([autocomplete="nope"])',
},
{
// Setting the enabled option to false will disable checks for this particular rule on all stories.
id: 'image-alt',
enabled: false,
},
],
},
options: {}
},
},
globals: {
a11y: {
manual: true,
},
},
});
</script>
import MyComponent from './MyComponent.svelte';
export default {
component: MyComponent,
parameters: {
a11y: {
// Optional selector to inspect
element: '#storybook-root',
config: {
rules: [
{
// The autocomplete rule will not run based on the CSS selector provided
id: 'autocomplete-valid',
selector: '*:not([autocomplete="nope"])',
},
{
// Setting the enabled option to false will disable checks for this particular rule on all stories.
id: 'image-alt',
enabled: false,
},
],
},
options: {},
},
},
globals: {
a11y: {
manual: true,
},
},
};
import { MyComponent } from './MyComponent';
export default {
component: MyComponent,
parameters: {
a11y: {
// Optional selector to inspect
element: '#storybook-root',
config: {
rules: [
{
// The autocomplete rule will not run based on the CSS selector provided
id: 'autocomplete-valid',
selector: '*:not([autocomplete="nope"])',
},
{
// Setting the enabled option to false will disable checks for this particular rule on all stories.
id: 'image-alt',
enabled: false,
},
],
},
options: {},
},
},
globals: {
a11y: {
manual: true,
},
},
};
<script module>
import { defineMeta } from '@storybook/addon-svelte-csf';
import MyComponent from './MyComponent.svelte';
const { Story } = defineMeta({
component: MyComponent,
parameters: {
a11y: {
// Optional selector to inspect
element: '#storybook-root',
config: {
rules: [
{
// The autocomplete rule will not run based on the CSS selector provided
id: 'autocomplete-valid',
selector: '*:not([autocomplete="nope"])',
},
{
// Setting the enabled option to false will disable checks for this particular rule on all stories.
id: 'image-alt',
enabled: false,
},
],
},
options: {},
},
},
globals: {
a11y: {
manual: true,
},
},
});
</script>
import type { Meta } from '@storybook/svelte';
import MyComponent from './MyComponent.svelte';
const meta = {
component: MyComponent,
parameters: {
a11y: {
// Optional selector to inspect
element: '#storybook-root',
config: {
rules: [
{
// The autocomplete rule will not run based on the CSS selector provided
id: 'autocomplete-valid',
selector: '*:not([autocomplete="nope"])',
},
{
// Setting the enabled option to false will disable checks for this particular rule on all stories.
id: 'image-alt',
enabled: false,
},
],
},
options: {},
},
},
globals: {
a11y: {
manual: true,
},
},
} satisfies Meta<typeof MyComponent>;
export default meta;
// Replace your-framework with the name of your framework
import type { Meta } from '@storybook/your-framework';
import { MyComponent } from './MyComponent';
const meta = {
component: MyComponent,
parameters: {
a11y: {
// Optional selector to inspect
element: '#storybook-root',
config: {
rules: [
{
// The autocomplete rule will not run based on the CSS selector provided
id: 'autocomplete-valid',
selector: '*:not([autocomplete="nope"])',
},
{
// Setting the enabled option to false will disable checks for this particular rule on all stories.
id: 'image-alt',
enabled: false,
},
],
},
options: {},
},
},
globals: {
a11y: {
manual: true,
},
},
} satisfies Meta<typeof MyComponent>;
export default meta;
<script module>
import { defineMeta } from '@storybook/addon-svelte-csf';
import MyComponent from './MyComponent.svelte';
const { Story } = defineMeta({
component: MyComponent,
parameters: {
a11y: {
// Optional selector to inspect
element: '#storybook-root',
config: {
rules: [
{
// The autocomplete rule will not run based on the CSS selector provided
id: 'autocomplete-valid',
selector: '*:not([autocomplete="nope"])',
},
{
// Setting the enabled option to false will disable checks for this particular rule on all stories.
id: 'image-alt',
enabled: false,
},
],
},
options: {},
},
},
globals: {
a11y: {
manual: true,
},
},
});
</script>
import type { Meta } from '@storybook/svelte';
import MyComponent from './MyComponent.svelte';
const meta: Meta<typeof MyComponent> = {
component: MyComponent,
parameters: {
a11y: {
// Optional selector to inspect
element: '#storybook-root',
config: {
rules: [
{
// The autocomplete rule will not run based on the CSS selector provided
id: 'autocomplete-valid',
selector: '*:not([autocomplete="nope"])',
},
{
// Setting the enabled option to false will disable checks for this particular rule on all stories.
id: 'image-alt',
enabled: false,
},
],
},
options: {},
},
},
globals: {
a11y: {
manual: true,
},
},
};
export default meta;
// Replace your-framework with the name of your framework
import type { Meta } from '@storybook/your-framework';
import { MyComponent } from './MyComponent';
const meta: Meta<typeof MyComponent> = {
component: MyComponent,
parameters: {
a11y: {
// Optional selector to inspect
element: '#storybook-root',
config: {
rules: [
{
// The autocomplete rule will not run based on the CSS selector provided
id: 'autocomplete-valid',
selector: '*:not([autocomplete="nope"])',
},
{
// Setting the enabled option to false will disable checks for this particular rule on all stories.
id: 'image-alt',
enabled: false,
},
],
},
options: {},
},
},
globals: {
a11y: {
manual: true,
},
},
};
export default meta;
export default {
component: 'my-component',
parameters: {
a11y: {
// Optional selector to inspect
element: '#storybook-root',
config: {
rules: [
{
// The autocomplete rule will not run based on the CSS selector provided
id: 'autocomplete-valid',
selector: '*:not([autocomplete="nope"])',
},
{
// Setting the enabled option to false will disable checks for this particular rule on all stories.
id: 'image-alt',
enabled: false,
},
],
},
options: {},
},
},
globals: {
a11y: {
manual: true,
},
},
};
import type { Meta, StoryObj } from '@storybook/web-components';
const meta: Meta = {
component: 'my-component',
parameters: {
a11y: {
// Optional selector to inspect
element: '#storybook-root',
config: {
rules: [
{
// The autocomplete rule will not run based on the CSS selector provided
id: 'autocomplete-valid',
selector: '*:not([autocomplete="nope"])',
},
{
// Setting the enabled option to false will disable checks for this particular rule on all stories.
id: 'image-alt',
enabled: false,
},
],
},
options: {},
},
},
globals: {
a11y: {
manual: true,
},
},
};
export default meta;