mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-04 22:01:26 +08:00
24 lines
457 B
JavaScript
24 lines
457 B
JavaScript
import { addParameters } from '@storybook/html';
|
|
|
|
const SOURCE_REGEX = /^\(\) => `(.*)`$/;
|
|
|
|
addParameters({
|
|
a11y: {
|
|
config: {},
|
|
options: {
|
|
checks: { 'color-contrast': { options: { noScroll: true } } },
|
|
restoreScroll: true,
|
|
},
|
|
},
|
|
options: {
|
|
showRoots: true,
|
|
},
|
|
docs: {
|
|
iframeHeight: '200px',
|
|
formatSource: src => {
|
|
const match = SOURCE_REGEX.exec(src);
|
|
return match ? match[1] : src;
|
|
},
|
|
},
|
|
});
|