-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Update ReactDagEditor to accept viewModel prop
- Loading branch information
Showing
8 changed files
with
868 additions
and
880 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,46 @@ | ||
import { dirname, join } from "path"; | ||
import type { StorybookConfig } from "@storybook/react-vite"; | ||
import { mergeConfig } from "vite"; | ||
import tsconfigPaths from "vite-tsconfig-paths"; | ||
|
||
const config: StorybookConfig = { | ||
stories: ["../stories/**/*.stories.@(js|jsx|ts|tsx|mdx)"], | ||
addons: ["@storybook/addon-essentials", "@storybook/addon-interactions"], | ||
stories: ["../stories/**/*.@(mdx|stories.@(js|jsx|ts|tsx))"], | ||
addons: [ | ||
getAbsolutePath("@storybook/addon-essentials"), | ||
getAbsolutePath("@storybook/addon-interactions"), | ||
"@chromatic-com/storybook", | ||
], | ||
async viteFinal(viteConfig) { | ||
return mergeConfig(viteConfig, { | ||
plugins: [ | ||
tsconfigPaths({ | ||
projects: ["../../tsconfig.base.json"], | ||
}), | ||
], | ||
}); | ||
}, | ||
framework: { | ||
name: "@storybook/react-vite", | ||
name: getAbsolutePath("@storybook/react-vite"), | ||
options: { | ||
builder: { | ||
viteConfigPath: "vite.config.ts", | ||
}, | ||
}, | ||
}, | ||
|
||
docs: {}, | ||
|
||
typescript: { | ||
reactDocgen: "react-docgen-typescript", | ||
}, | ||
}; | ||
|
||
export default config; | ||
|
||
// To customize your Vite configuration you can use the viteFinal field. | ||
// Check https://storybook.js.org/docs/react/builders/vite#configuration | ||
// and https://nx.dev/recipes/storybook/custom-builder-configs | ||
|
||
function getAbsolutePath(value: string): any { | ||
return dirname(require.resolve(join(value, "package.json"))); | ||
} |
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 @@ | ||
export const tags = ["autodocs"]; |
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,36 @@ | ||
import { dirname, join } from "path"; | ||
import type { StorybookConfig } from "@storybook/react-vite"; | ||
|
||
const config: StorybookConfig = { | ||
stories: ["../src/stories/**/*.stories.@(js|jsx|ts|tsx|mdx)"], | ||
addons: ["@storybook/addon-essentials", "@storybook/addon-interactions"], | ||
addons: [ | ||
getAbsolutePath("@storybook/addon-essentials"), | ||
getAbsolutePath("@storybook/addon-interactions"), | ||
"@chromatic-com/storybook", | ||
], | ||
|
||
framework: { | ||
name: "@storybook/react-vite", | ||
name: getAbsolutePath("@storybook/react-vite"), | ||
options: { | ||
builder: { | ||
viteConfigPath: "vite.config.ts", | ||
}, | ||
}, | ||
}, | ||
|
||
docs: {}, | ||
|
||
typescript: { | ||
reactDocgen: "react-docgen-typescript", | ||
}, | ||
}; | ||
|
||
export default config; | ||
|
||
// To customize your Vite configuration you can use the viteFinal field. | ||
// Check https://storybook.js.org/docs/react/builders/vite#configuration | ||
// and https://nx.dev/recipes/storybook/custom-builder-configs | ||
|
||
function getAbsolutePath(value: string): any { | ||
return dirname(require.resolve(join(value, "package.json"))); | ||
} |
Oops, something went wrong.