Skip to content

Commit

Permalink
chore(plasma-new-hope): bump Storybook version to latest
Browse files Browse the repository at this point in the history
  • Loading branch information
denivladislav committed Dec 24, 2024
1 parent 9f8d42e commit c7ffb13
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 16 deletions.
4 changes: 3 additions & 1 deletion packages/plasma-new-hope/.storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ const config: StorybookConfig = {
disableTelemetry: true,
},
docs: {
autodocs: true,
defaultName: 'Docs',
},
async viteFinal(config) {
Expand All @@ -57,6 +56,9 @@ const config: StorybookConfig = {
],
});
},
typescript: {
reactDocgen: 'react-docgen-typescript',
},
};

export default config;
2 changes: 1 addition & 1 deletion packages/plasma-new-hope/.storybook/manager.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { addons } from '@storybook/addons';
import { addons } from '@storybook/manager-api';
import theme from './theme';

addons.setConfig({
Expand Down
1 change: 1 addition & 0 deletions packages/plasma-new-hope/.storybook/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const preview: Preview = {
},
},
},
tags: ['autodocs'],
};

export default preview;
15 changes: 8 additions & 7 deletions packages/plasma-new-hope/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,13 @@
"@rollup/plugin-node-resolve": "^15.1.0",
"@salutejs/plasma-sb-utils": "0.188.1-dev.0",
"@salutejs/plasma-themes": "0.27.0-dev.0",
"@storybook/addon-docs": "^7.6.17",
"@storybook/addon-essentials": "^7.6.17",
"@storybook/addon-docs": "^8.4.7",
"@storybook/addon-essentials": "^8.4.7",
"@storybook/addons": "^7.6.17",
"@storybook/react": "^7.6.17",
"@storybook/react-vite": "7.6.17",
"@storybook/theming": "^7.6.17",
"@storybook/manager-api": "^8.4.7",
"@storybook/react": "^8.4.7",
"@storybook/react-vite": "^8.4.7",
"@storybook/theming": "^8.4.7",
"@types/lodash": "^4.14.191",
"@types/lodash.throttle": "4.1.6",
"@types/node": "15.14.9",
Expand All @@ -120,7 +121,7 @@
"react": "18.2.0",
"react-dom": "18.2.0",
"rollup": "^3.28.0",
"storybook": "7.6.17",
"storybook": "^8.4.7",
"styled-components": "5.3.1",
"vite": "4.5.3"
},
Expand All @@ -146,4 +147,4 @@
"sideEffects": [
"*.css"
]
}
}
12 changes: 5 additions & 7 deletions packages/plasma-new-hope/src/examples/_helpers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,13 @@ export function argTypesFromConfig<
const argTypes: ArgTypes = {};

for (const [key, val] of filteredVariations) {
const control: ArgTypes[''] = {
control: {},
};
const control: ArgTypes[''] = {};

if (val.true) {
control.control.type = 'boolean';
control.table = { defaultValue: { summary: false } };
control.control = 'boolean';
control.table = { defaultValue: { summary: '' } };
} else {
control.control.type = 'select';
control.control = 'select';
control.options = Object.keys(val).filter((name) => name !== 'css');
}

Expand All @@ -39,7 +37,7 @@ export function argTypesFromConfig<
if (defaultValue) {
control.table = {
defaultValue: {
summary: val.true ? Boolean(defaultValue) : defaultValue,
summary: val.true ? '' : defaultValue,
},
};
}
Expand Down
6 changes: 6 additions & 0 deletions packages/plasma-new-hope/vite.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';

export default defineConfig({
plugins: [react()],
});

0 comments on commit c7ffb13

Please sign in to comment.