-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
3,473 additions
and
3,774 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import type { StorybookConfig } from '@storybook/react-webpack5' | ||
import fs from 'fs' | ||
import path from 'path' | ||
|
||
import { join, dirname } from 'path' | ||
|
||
const alias = {} | ||
const jsEntry = '../../extension/src/js' | ||
Object.assign( | ||
alias, | ||
...fs | ||
.readdirSync(path.join(__dirname, jsEntry), { withFileTypes: true }) | ||
.filter((dirent) => dirent.isDirectory()) | ||
.map((dirent) => dirent.name) | ||
.map((entry) => ({ [entry]: path.join(__dirname, jsEntry, entry) })), | ||
) | ||
|
||
/** | ||
* This function is used to resolve the absolute path of a package. | ||
* It is needed in projects that use Yarn PnP or are set up within a monorepo. | ||
*/ | ||
function getAbsolutePath(value: string): any { | ||
return dirname(require.resolve(join(value, 'package.json'))) | ||
} | ||
const config: StorybookConfig = { | ||
stories: [ | ||
'../../extension/src/**/*.mdx', | ||
'../../extension/src/**/*.stories.@(js|jsx|mjs|ts|tsx)', | ||
], | ||
addons: [ | ||
getAbsolutePath('@storybook/addon-links'), | ||
getAbsolutePath('@storybook/addon-essentials'), | ||
getAbsolutePath('@storybook/addon-onboarding'), | ||
getAbsolutePath('@storybook/addon-interactions'), | ||
], | ||
webpackFinal: (config) => { | ||
if (config.resolve && config.resolve.alias) { | ||
Object.assign(config.resolve.alias, alias) | ||
} | ||
return config | ||
}, | ||
framework: { | ||
name: getAbsolutePath('@storybook/react-webpack5'), | ||
options: { | ||
builder: { | ||
useSWC: true, | ||
}, | ||
}, | ||
}, | ||
docs: { | ||
autodocs: 'tag', | ||
}, | ||
} | ||
export default config |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import type { Preview } from '@storybook/react' | ||
|
||
const preview: Preview = { | ||
parameters: { | ||
actions: { argTypesRegex: '^on[A-Z].*' }, | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/i, | ||
}, | ||
}, | ||
options: { | ||
isToolshown: true, | ||
storySort: { | ||
order: ['Introduction', 'Changelog', 'UI Components'], | ||
}, | ||
}, | ||
}, | ||
} | ||
|
||
export default preview |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
388540f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
tab-manager-v2-storybook – ./
tab-manager-v2-storybook.vercel.app
tab-manager.vercel.app
tab-manager-v2-storybook-xcv58.vercel.app
tab-manager-v2-storybook-git-master-xcv58.vercel.app