- .storybook/main.ts: add viteFinal with allowedHosts for veza.fr/com domains - DESIGN_TOKENS.md: document modal max-height tokens and typography exceptions (avatar xs text-[10px]) - capture-visual-baseline.mjs: fix locator selectors for sidebar and player captures Co-authored-by: Cursor <cursoragent@cursor.com>
43 lines
No EOL
1.2 KiB
TypeScript
43 lines
No EOL
1.2 KiB
TypeScript
import type { StorybookConfig } from '@storybook/react-vite';
|
|
|
|
import { dirname, join } from "path"
|
|
|
|
function getAbsolutePath(value: string) {
|
|
return dirname(require.resolve(join(value, "package.json")))
|
|
}
|
|
|
|
const config: StorybookConfig = {
|
|
"stories": [
|
|
"../src/**/*.mdx",
|
|
"../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"
|
|
],
|
|
"addons": [
|
|
getAbsolutePath('@storybook/addon-essentials'),
|
|
getAbsolutePath('@storybook/addon-a11y'),
|
|
getAbsolutePath('@storybook/addon-interactions'),
|
|
getAbsolutePath('msw-storybook-addon'),
|
|
],
|
|
"staticDirs": ['../public'],
|
|
"framework": getAbsolutePath('@storybook/react-vite'),
|
|
"docs": {
|
|
"defaultName": "Documentation",
|
|
"autodocs": true
|
|
},
|
|
"typescript": {
|
|
"reactDocgen": "react-docgen-typescript",
|
|
"reactDocgenTypescriptOptions": {
|
|
"shouldExtractLiteralValuesFromEnum": true,
|
|
"propFilter": (prop) => (prop.parent ? !/node_modules/.test(prop.parent.fileName) : true),
|
|
},
|
|
},
|
|
async viteFinal(config) {
|
|
return {
|
|
...config,
|
|
server: {
|
|
...config.server,
|
|
allowedHosts: ['veza.fr', 'veza.com', 'veza.talas.fr', 'veza.talas.com'],
|
|
},
|
|
};
|
|
},
|
|
};
|
|
export default config; |