- design token system (Atlantis, Kimberly, Powder Ash palette) - Button, Badge, Input, Select, Card, SidePanel, Breadcrumbs components - generic typed Table<T> component with loading/empty states - API data layer: typed fetch client for environments, keys, sessions, scenarios - Vite dev proxy targeting server on port 13000 - App shell with SidePanel nav and four entity pages (Environments, Keys, Sessions, Scenarios) - Storybook config with dark/light theme toggle and a11y addon
26 lines
769 B
TypeScript
26 lines
769 B
TypeScript
import type { StorybookConfig } from '@storybook/react-vite';
|
|
|
|
import { dirname } from "path"
|
|
|
|
import { fileURLToPath } from "url"
|
|
|
|
/**
|
|
* 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(fileURLToPath(import.meta.resolve(`${value}/package.json`)))
|
|
}
|
|
const config: StorybookConfig = {
|
|
"stories": [
|
|
"../src/**/*.mdx",
|
|
"../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"
|
|
],
|
|
"addons": [
|
|
getAbsolutePath('@storybook/addon-vitest'),
|
|
getAbsolutePath('@storybook/addon-a11y'),
|
|
getAbsolutePath('@storybook/addon-docs')
|
|
],
|
|
"framework": getAbsolutePath('@storybook/react-vite')
|
|
};
|
|
export default config; |