* ✨ feat: integrate Storybook addons and enhance Tabs component - Added `@storybook/addon-designs` and `@storybook/addon-docs` to the project dependencies. - Enhanced the Tabs component stories to support dynamic tab options. - Introduced a custom theme for Storybook with a new manager configuration. - Added a new SVG logo for branding in Storybook. - Pinned the storybook and related packages version * ♻️ refactor: update Storybook manager configuration by removing unused import * ♻️ refactor: enhance Tabs story with size labels and layout adjustments * 🚨 fix: lint issues * 🚨 fix: lock file * ✏️ fix: update brand image path in Storybook manager configuration * ♻️ refactor: improve Tabs story by ensuring safe default value and enhancing content rendering
20 lines
624 B
TypeScript
20 lines
624 B
TypeScript
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: ["@storybook/addon-designs", "@storybook/addon-docs"],
|
|
framework: {
|
|
name: getAbsolutePath("@storybook/react-vite"),
|
|
options: {},
|
|
},
|
|
};
|
|
export default config;
|