Skip to content

Commit

Permalink
Bump Storybook dependencies to v8.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcgrtz committed Apr 1, 2024
1 parent 7c33666 commit 52b4c9f
Show file tree
Hide file tree
Showing 8 changed files with 3,331 additions and 3,440 deletions.
8 changes: 6 additions & 2 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
/** @type {import('@storybook/core-common').StorybookConfig} */
module.exports = {
stories: ['../src/**/*.stories.@(tsx|mdx)'],
stories: ['../src/**/*.stories.tsx'],
framework: {
name: '@storybook/react-webpack5',
options: {},
},
addons: ['@storybook/addon-essentials', '@storybook/addon-a11y'],
addons: [
'@storybook/addon-essentials',
'@storybook/addon-a11y',
'@storybook/addon-webpack5-compiler-babel'
],
features: {
postcss: false,
},
Expand Down
6,700 changes: 3,293 additions & 3,407 deletions package-lock.json

Large diffs are not rendered by default.

15 changes: 9 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
"@babel/preset-react": "^7.22.3",
"@babel/preset-typescript": "^7.24.1",
"@happy-dom/jest-environment": "^12.10.3",
"@storybook/addon-a11y": "^7.6.17",
"@storybook/addon-essentials": "^7.6.17",
"@storybook/addon-a11y": "^8.0.5",
"@storybook/addon-essentials": "^8.0.5",
"@storybook/addons": "^7.6.17",
"@storybook/react": "^7.6.17",
"@storybook/react-webpack5": "^7.6.17",
"@storybook/react": "^8.0.5",
"@storybook/react-webpack5": "^8.0.5",
"@testing-library/react": "^14.2.1",
"@testing-library/user-event": "^14.5.2",
"@types/jest": "^29.5.12",
Expand All @@ -24,7 +24,7 @@
"eslint-config-xo-react": "^0.27.0",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-storybook": "^0.6.15",
"eslint-plugin-storybook": "^0.8.0",
"husky": "^9.0.7",
"jest": "^29.7.0",
"jest-styled-components": "^7.2.0",
Expand All @@ -33,7 +33,7 @@
"prettier": "^3.2.4",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"storybook": "^7.6.17",
"storybook": "^8.0.5",
"styled-components": "^6.1.8",
"stylelint": "^16.2.1",
"stylelint-config-standard": "^36.0.0",
Expand All @@ -57,5 +57,8 @@
"test": "jest",
"test:coverage": "jest --silent --coverage",
"test:watch": "jest --watchAll"
},
"devDependencies": {
"@storybook/addon-webpack5-compiler-babel": "^3.0.3"
}
}
4 changes: 2 additions & 2 deletions src/button/stories/index.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ const meta: Meta = {
},
};

export const ButtonStory: StoryFn<typeof Button> = (args) => (
<Button {...args} />
export const ButtonStory: StoryFn<typeof Button> = (properties) => (
<Button {...properties} />
);
ButtonStory.storyName = 'Button';

Expand Down
4 changes: 3 additions & 1 deletion src/chat/stories/index.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ const meta: Meta = {
},
};

export const ChatStory: StoryFn<typeof Chat> = (args) => <Chat {...args} />;
export const ChatStory: StoryFn<typeof Chat> = (properties) => (
<Chat {...properties} />
);
ChatStory.storyName = 'Chat';

export default meta;
16 changes: 7 additions & 9 deletions src/datetime/stories/index.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import React from 'react';
import type {Meta, StoryObj} from '@storybook/react';
import type {Meta, StoryFn} from '@storybook/react';
import DateTime from '..';

const defaultArgs = {
dateTime: new Date(),
};

const meta: Meta = {
title: 'Design System/Components',
component: DateTime,
Expand All @@ -14,12 +10,14 @@ const meta: Meta = {
control: 'date',
},
},
args: defaultArgs,
args: {
dateTime: new Date(),
},
};

export const DateTimeStory: StoryObj<typeof DateTime> = (
args: typeof defaultArgs
) => <DateTime {...args} />;
export const DateTimeStory: StoryFn<typeof DateTime> = (properties) => (
<DateTime {...properties} />
);
DateTimeStory.storyName = 'Date and time';

export default meta;
20 changes: 9 additions & 11 deletions src/hamburger-button/stories/index.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
import React from 'react';
import type {Meta, StoryObj} from '@storybook/react';
import type {Meta, StoryFn} from '@storybook/react';
import HamburgerButton from '..';

const defaultArgs = {
label: 'Menü anzeigen',
labelActive: 'Menü ausblenden',
position: {blockStart: '20px', inlineStart: '20px'},
};

const meta: Meta = {
title: 'Design System/Components',
component: HamburgerButton,
args: defaultArgs,
args: {
label: 'Menü anzeigen',
labelActive: 'Menü ausblenden',
position: {blockStart: '20px', inlineStart: '20px'},
},
};

export const HamburgerButtonStory: StoryObj<typeof HamburgerButton> = (
args: typeof defaultArgs
) => <HamburgerButton {...args} />;
export const HamburgerButtonStory: StoryFn<typeof HamburgerButton> = (
properties
) => <HamburgerButton {...properties} />;
HamburgerButtonStory.storyName = 'Hamburger button';

export default meta;
4 changes: 2 additions & 2 deletions src/logo/stories/index.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import type {Story, Meta} from '@storybook/react';
import type {StoryFn, Meta} from '@storybook/react';
import Logo from '..';

const meta: Meta = {
Expand All @@ -12,7 +12,7 @@ const meta: Meta = {
},
};

const Template: Story = (args) => <Logo {...args} />;
const Template: StoryFn<typeof Logo> = (properties) => <Logo {...properties} />;

export const LogoStory = Template.bind({});
LogoStory.storyName = 'Default logo';
Expand Down

0 comments on commit 52b4c9f

Please sign in to comment.