Remove storybook

This commit is contained in:
Nathan Bierema 2024-04-01 16:11:52 -04:00
parent 075e9f6099
commit 222223d075
4 changed files with 47 additions and 3229 deletions

View File

@ -1,24 +0,0 @@
import type { StorybookConfig } from '@storybook/react-webpack5';
const config: StorybookConfig = {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
addons: [
'@storybook/addon-links',
{
name: '@storybook/addon-essentials',
options: {
backgrounds: false,
},
},
'@storybook/addon-interactions',
],
framework: {
name: '@storybook/react-webpack5',
options: {},
},
docs: {
autodocs: 'tag',
},
};
export default config;

View File

@ -1,55 +0,0 @@
import React from 'react';
import type { Preview } from '@storybook/react';
import { Container } from '../src';
import { listSchemes, listThemes } from '../src/utils/theme';
const withThemeProvider = (Story, context) => (
<Container
themeData={{
theme: context.globals.theme,
scheme: context.globals.scheme,
colorPreference: context.globals.color,
}}
>
<Story {...context} />
</Container>
);
const preview: Preview = {
parameters: {
actions: { argTypesRegex: '^on[A-Z].*' },
},
globalTypes: {
theme: {
name: 'Theme',
description: 'Global theme for components',
defaultValue: 'default',
toolbar: {
items: listThemes(),
showName: true,
},
},
scheme: {
name: 'Color Scheme',
description: 'Global color scheme for components',
defaultValue: 'default',
toolbar: {
items: listSchemes(),
showName: true,
},
},
color: {
name: 'Color',
description: 'Global color for components',
defaultValue: 'light',
toolbar: {
items: ['auto', 'light', 'dark'],
showName: true,
},
},
},
decorators: [withThemeProvider],
};
export default preview;

View File

@ -25,8 +25,6 @@
},
"scripts": {
"start": "pnpm run storybook",
"storybook": "storybook dev --port 6006 --static-dir ./fonts",
"build:storybook": "storybook build --static-dir ./fonts --quiet",
"build": "pnpm run build:lib && pnpm run build:storybook",
"build:lib": "pnpm run build:cjs && pnpm run build:esm && pnpm run build:types && pnpm run build:css",
"build:cjs": "babel src --extensions \".ts,.tsx\" --out-dir lib/cjs",
@ -65,11 +63,6 @@
"@babel/preset-env": "^7.24.3",
"@babel/preset-react": "^7.24.1",
"@babel/preset-typescript": "^7.24.1",
"@storybook/addon-essentials": "^7.6.17",
"@storybook/addon-interactions": "^7.6.17",
"@storybook/addon-links": "^7.6.17",
"@storybook/react": "^7.6.17",
"@storybook/react-webpack5": "^7.6.17",
"@testing-library/dom": "^9.3.4",
"@testing-library/react": "^14.2.2",
"@testing-library/user-event": "^14.5.2",
@ -93,7 +86,6 @@
"react-dom": "^18.2.0",
"react-is": "^18.2.0",
"rimraf": "^5.0.5",
"storybook": "^7.6.17",
"styled-components": "^5.3.11",
"stylelint": "^16.3.1",
"stylelint-config-standard": "^36.0.0",

File diff suppressed because it is too large Load Diff