[WEB-4725] chore: storybook setup & tailwind config package improvements (#7614)
* chore: global css file added to tailwind config package * chore: tailwind config updated * chore: cn utility function added to propel package * chore: storybook init * fix: format error * chore: code refactor * chore: code refactor * fix: format error * fix: build error
This commit is contained in:
parent
34e231230f
commit
c2464939fc
10 changed files with 1164 additions and 6 deletions
20
packages/propel/.storybook/main.ts
Normal file
20
packages/propel/.storybook/main.ts
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
import type { StorybookConfig } from "@storybook/react-vite";
|
||||
|
||||
import { join, dirname } from "path";
|
||||
|
||||
/*
|
||||
* 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) {
|
||||
return dirname(require.resolve(join(value, "package.json")));
|
||||
}
|
||||
const config: StorybookConfig = {
|
||||
stories: ["../src/**/*.stories.@(ts|tsx)"],
|
||||
addons: [],
|
||||
framework: {
|
||||
name: getAbsolutePath("@storybook/react-vite"),
|
||||
options: {},
|
||||
},
|
||||
};
|
||||
export default config;
|
||||
11
packages/propel/.storybook/preview.ts
Normal file
11
packages/propel/.storybook/preview.ts
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import type { Preview } from "@storybook/react-vite";
|
||||
import "@plane/tailwind-config/global.css";
|
||||
|
||||
const preview: Preview = {
|
||||
parameters: {
|
||||
controls: {
|
||||
matchers: {},
|
||||
},
|
||||
},
|
||||
};
|
||||
export default preview;
|
||||
Loading…
Add table
Add a link
Reference in a new issue