* refactored Storybook UI * refactored Storybook UI * removed extra cards from the doc, added card for ui components * added hover behavior to doc page & made it look selected * separate storybook docs and tests * separating storybook tests and docs
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
const path = require('path');
|
||||
|
||||
computeStoriesGlob = () => {
|
||||
if (process.env.STORYBOOK_STORIES_FOLDER === 'pages') {
|
||||
if (process.env.STORYBOOK_SCOPE === 'pages') {
|
||||
return [
|
||||
'../src/pages/**/*.stories.@(js|jsx|ts|tsx)',
|
||||
'../src/__stories__/*.stories.@(js|jsx|ts|tsx)',
|
||||
@ -10,10 +10,14 @@ computeStoriesGlob = () => {
|
||||
]
|
||||
}
|
||||
|
||||
if (process.env.STORYBOOK_STORIES_FOLDER === 'modules') {
|
||||
if (process.env.STORYBOOK_SCOPE === 'modules') {
|
||||
return ['../src/modules/**/*.stories.@(js|jsx|ts|tsx)', '../src/modules/**/*.docs.mdx']
|
||||
}
|
||||
|
||||
if (process.env.STORYBOOK_SCOPE === 'ui-docs') {
|
||||
return ['../src/modules/ui/**/*.docs.mdx'];
|
||||
}
|
||||
|
||||
return ['../src/**/*.stories.@(js|jsx|ts|tsx)', '../src/**/*.docs.mdx']
|
||||
};
|
||||
|
||||
|
||||
@ -9,5 +9,5 @@ module.exports = {
|
||||
/** Add your own overrides below
|
||||
* @see https://jestjs.io/docs/configuration
|
||||
*/
|
||||
testTimeout: process.env.STORYBOOK_STORIES_FOLDER === 'pages' ? 60000 : 15000,
|
||||
testTimeout: process.env.STORYBOOK_SCOPE=== 'pages' ? 60000 : 15000,
|
||||
};
|
||||
Reference in New Issue
Block a user