gitbutler/packages/ui/.storybook/main.ts
Pavel Laptev aaf933f42d
UI package update (#4598)
* add `Button` and `Icon` to UI library

* Update Button.stories.ts

* button stories added

* remove unused dependencies

* update button stories

* Update DemoButton.stories.ts

* update tokens

* dark theme toggle fix

* replace buttons with buttons from the package UI

* Update FileCardHeader.svelte

* Update BranchLaneContextMenu.svelte

* replace the app `Icon` component with the `UI` component

* fix `Icon` import in the `package UI`

* update imports for `icons.json`

* fix wrong type on Storybook

* update imports for `types`

* fix import order

* storybook grouping update
2024-08-05 13:20:03 +02:00

21 lines
595 B
TypeScript

import { dirname, join } from 'path';
import type { StorybookConfig } from '@storybook/sveltekit';
const config: StorybookConfig = {
stories: ['../src/stories/**/*.mdx', '../src/stories/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
getAbsolutePath('@storybook/addon-links'),
getAbsolutePath('@storybook/addon-essentials'),
getAbsolutePath('storybook-dark-mode')
],
framework: {
name: getAbsolutePath('@storybook/sveltekit'),
options: {}
}
};
export default config;
function getAbsolutePath(value: string): any {
return dirname(require.resolve(join(value, 'package.json')));
}