mirror of
https://github.com/storybookjs/storybook.git
synced 2025-03-28 05:10:17 +08:00
21 lines
431 B
JavaScript
21 lines
431 B
JavaScript
import { addParameters } from '@storybook/html';
|
|
|
|
const SOURCE_REGEX = /^\(\) => [`'"](.*)['`"]$/;
|
|
|
|
addParameters({
|
|
a11y: {
|
|
config: {},
|
|
options: {
|
|
checks: { 'color-contrast': { options: { noScroll: true } } },
|
|
restoreScroll: true,
|
|
},
|
|
},
|
|
docs: {
|
|
iframeHeight: '200px',
|
|
transformSource: (src) => {
|
|
const match = SOURCE_REGEX.exec(src);
|
|
return match ? match[1] : src;
|
|
},
|
|
},
|
|
});
|