Skip to content

Commit

Permalink
chore: upgrade storybook to v8 (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
ValeraS authored May 13, 2024
1 parent ce4c8ce commit 4743ed3
Show file tree
Hide file tree
Showing 5 changed files with 7,546 additions and 10,418 deletions.
33 changes: 14 additions & 19 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
import type {StorybookConfig} from '@storybook/react-webpack5';

const config: StorybookConfig = {
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(ts|tsx)'],
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(ts|tsx)'],
addons: [
'@storybook/preset-scss',
{name: '@storybook/addon-essentials', options: {backgrounds: false}},
'@storybook/addon-a11y',
'./theme-addon/register.tsx',
'@storybook/addon-webpack5-compiler-babel',
],
framework: {
name: '@storybook/react-webpack5',
options: {},
},
framework: '@storybook/react-webpack5',
typescript: {
check: false,
checkOptions: {},
Expand All @@ -20,22 +18,19 @@ const config: StorybookConfig = {
core: {
disableTelemetry: true,
},
babel: (transformOptions) => {
return {
...transformOptions,
presets: [
[
'@babel/preset-env',
{
targets: {
chrome: 100,
},
babel: {
presets: [
[
'@babel/preset-env',
{
targets: {
chrome: 100,
},
],
'@babel/preset-typescript',
['@babel/preset-react', {runtime: 'automatic'}],
},
],
};
'@babel/preset-typescript',
['@babel/preset-react', {runtime: 'automatic'}],
],
},
};

Expand Down
2 changes: 1 addition & 1 deletion .storybook/manager.ts
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 {themes} from './theme';

Expand Down
5 changes: 2 additions & 3 deletions .storybook/theme-addon/register.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import React from 'react';

import {getThemeType} from '@gravity-ui/uikit';
import {addons, types} from '@storybook/addons';
import {useGlobals} from '@storybook/api';
import type {API} from '@storybook/api';
import {addons, types, useGlobals} from '@storybook/manager-api';
import type {API} from '@storybook/manager-api';

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

Expand Down
Loading

0 comments on commit 4743ed3

Please sign in to comment.