Skip to content

Commit 4743ed3

Browse files
authored
chore: upgrade storybook to v8 (#70)
1 parent ce4c8ce commit 4743ed3

File tree

5 files changed

+7546
-10418
lines changed

5 files changed

+7546
-10418
lines changed

.storybook/main.ts

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
import type {StorybookConfig} from '@storybook/react-webpack5';
22

33
const config: StorybookConfig = {
4-
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(ts|tsx)'],
4+
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(ts|tsx)'],
55
addons: [
66
'@storybook/preset-scss',
77
{name: '@storybook/addon-essentials', options: {backgrounds: false}},
88
'@storybook/addon-a11y',
99
'./theme-addon/register.tsx',
10+
'@storybook/addon-webpack5-compiler-babel',
1011
],
11-
framework: {
12-
name: '@storybook/react-webpack5',
13-
options: {},
14-
},
12+
framework: '@storybook/react-webpack5',
1513
typescript: {
1614
check: false,
1715
checkOptions: {},
@@ -20,22 +18,19 @@ const config: StorybookConfig = {
2018
core: {
2119
disableTelemetry: true,
2220
},
23-
babel: (transformOptions) => {
24-
return {
25-
...transformOptions,
26-
presets: [
27-
[
28-
'@babel/preset-env',
29-
{
30-
targets: {
31-
chrome: 100,
32-
},
21+
babel: {
22+
presets: [
23+
[
24+
'@babel/preset-env',
25+
{
26+
targets: {
27+
chrome: 100,
3328
},
34-
],
35-
'@babel/preset-typescript',
36-
['@babel/preset-react', {runtime: 'automatic'}],
29+
},
3730
],
38-
};
31+
'@babel/preset-typescript',
32+
['@babel/preset-react', {runtime: 'automatic'}],
33+
],
3934
},
4035
};
4136

.storybook/manager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {addons} from '@storybook/addons';
1+
import {addons} from '@storybook/manager-api';
22

33
import {themes} from './theme';
44

.storybook/theme-addon/register.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import React from 'react';
22

33
import {getThemeType} from '@gravity-ui/uikit';
4-
import {addons, types} from '@storybook/addons';
5-
import {useGlobals} from '@storybook/api';
6-
import type {API} from '@storybook/api';
4+
import {addons, types, useGlobals} from '@storybook/manager-api';
5+
import type {API} from '@storybook/manager-api';
76

87
import {themes} from '../theme';
98

0 commit comments

Comments
 (0)