Skip to content

Commit

Permalink
chore: Update storybook to 8.x.x (#536)
Browse files Browse the repository at this point in the history
  • Loading branch information
emil-litwiniec authored Apr 26, 2024
1 parent 0f5cb7c commit 4e2eb3c
Show file tree
Hide file tree
Showing 12 changed files with 1,646 additions and 2,034 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
"@nx/webpack": "17.1.3",
"@sb/cli": "*",
"@sb/core": "*",
"@storybook/addon-actions": "^7.6.1",
"@storybook/react": "^7.6.1",
"@storybook/addon-actions": "^8.0.9",
"@storybook/react": "^8.0.9",
"@svgr/webpack": "^8.1.0",
"@tailwindcss/typography": "^0.5.10",
"@testing-library/dom": "^9.3.3",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { ApiTestProviders } from '@sb/webapp-api-client/tests/utils/rendering';
import { Story } from '@storybook/react';
import { StoryFn } from '@storybook/react';

import { WrapperProps, getWrapper } from '../tests/utils/rendering';

export function withProviders(wrapperProps: WrapperProps = {}) {
return (StoryComponent: Story, storyContext: any) => {
return (StoryComponent: StoryFn, storyContext: any) => {
const { wrapper: WrapperComponent } = getWrapper(ApiTestProviders, wrapperProps, storyContext);

return (
Expand Down
4 changes: 2 additions & 2 deletions packages/webapp-libs/webapp-core/src/utils/storybook.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Story } from '@storybook/react';
import { StoryFn } from '@storybook/react';

import { CoreTestProviders, WrapperProps, getWrapper } from '../tests/utils/rendering';

export function withProviders(wrapperProps: WrapperProps = {}) {
return (StoryComponent: Story) => {
return (StoryComponent: StoryFn) => {
const { wrapper: WrapperComponent } = getWrapper(CoreTestProviders, wrapperProps);

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const meta: Meta = {
argTypes: {
item: {
control: {
type: null,
type: undefined,
},
},
},
Expand Down
4 changes: 2 additions & 2 deletions packages/webapp-libs/webapp-crud-demo/src/utils/storybook.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { ApiTestProviders } from '@sb/webapp-api-client/tests/utils/rendering';
import { Story } from '@storybook/react';
import { StoryFn } from '@storybook/react';

import { WrapperProps, getWrapper } from '../tests/utils/rendering';

export function withProviders(wrapperProps: WrapperProps = {}) {
return (StoryComponent: Story) => {
return (StoryComponent: StoryFn) => {
const { wrapper: WrapperComponent } = getWrapper(ApiTestProviders, wrapperProps);

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const meta: Meta<typeof Document> = {
argTypes: {
item: {
control: {
type: null,
type: undefined,
},
},
},
Expand Down
4 changes: 2 additions & 2 deletions packages/webapp-libs/webapp-documents/src/utils/storybook.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { ApiTestProviders } from '@sb/webapp-api-client/tests/utils/rendering';
import { Story } from '@storybook/react';
import { StoryFn } from '@storybook/react';

import { WrapperProps, getWrapper } from '../tests/utils/rendering';

export function withProviders(wrapperProps: WrapperProps = {}) {
return (StoryComponent: Story) => {
return (StoryComponent: StoryFn) => {
const { wrapper: WrapperComponent } = getWrapper(ApiTestProviders, wrapperProps);

return (
Expand Down
6 changes: 3 additions & 3 deletions packages/webapp-libs/webapp-finances/src/utils/storybook.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { ApiTestProviders } from '@sb/webapp-api-client/tests/utils/rendering';
import { Story } from '@storybook/react';
import { StoryFn } from '@storybook/react';
import { Elements } from '@stripe/react-stripe-js';
import { Route, Routes } from 'react-router-dom';

import { ActiveSubscriptionContext } from '../components/activeSubscriptionContext';
import { stripePromise } from '../services/stripe';
import { WrapperProps, getWrapper } from '../tests/utils/rendering';

export const withActiveSubscriptionContext = (StoryComponent: Story) => {
export const withActiveSubscriptionContext = (StoryComponent: StoryFn) => {
return (
<Routes>
<Route element={<ActiveSubscriptionContext />}>
Expand All @@ -25,7 +25,7 @@ export const withActiveSubscriptionContext = (StoryComponent: Story) => {
};

export function withProviders(wrapperProps: WrapperProps = {}) {
return (StoryComponent: Story) => {
return (StoryComponent: StoryFn) => {
const { wrapper: WrapperComponent } = getWrapper(ApiTestProviders, wrapperProps) as any;

return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { ApiTestProviders } from '@sb/webapp-api-client/tests/utils/rendering';
import { Story } from '@storybook/react';
import { StoryFn } from '@storybook/react';

import { WrapperProps, getWrapper } from '../tests/utils/rendering';

export function withProviders(wrapperProps: WrapperProps = {}) {
return (StoryComponent: Story) => {
return (StoryComponent: StoryFn) => {
const { wrapper: WrapperComponent } = getWrapper(ApiTestProviders, wrapperProps);

return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { ApiTestProviders } from '@sb/webapp-api-client/tests/utils/rendering';
import { Story } from '@storybook/react';
import { StoryFn } from '@storybook/react';

import { WrapperProps, getWrapper } from '../tests/utils/rendering';

export function withProviders(wrapperProps: WrapperProps = {}) {
return (StoryComponent: Story) => {
return (StoryComponent: StoryFn) => {
const { wrapper: WrapperComponent } = getWrapper(ApiTestProviders, wrapperProps);

return (
Expand Down
16 changes: 8 additions & 8 deletions packages/webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@
"@sb/webapp-finances": "*",
"@sb/webapp-generative-ai": "*",
"@sb/webapp-notifications": "*",
"@storybook/addon-essentials": "^7.6.1",
"@storybook/addon-measure": "^7.6.1",
"@storybook/addon-essentials": "^8.0.9",
"@storybook/addon-measure": "^8.0.9",
"@storybook/addon-styling": "^1.3.7",
"@storybook/cli": "^7.6.1",
"@storybook/client-api": "^7.6.1",
"@storybook/client-logger": "^7.6.1",
"@storybook/react-vite": "^7.6.1",
"@storybook/cli": "^8.0.9",
"@storybook/client-api": "^7.6.17",
"@storybook/client-logger": "^8.0.9",
"@storybook/react-vite": "^8.0.9",
"@types/qrcode": "^1.5.5",
"@vitejs/plugin-legacy": "^4.1.1",
"autoprefixer": "^10.4.16",
Expand All @@ -57,8 +57,8 @@
"postcss": "^8.4.31",
"rollup-plugin-node-builtins": "^2.1.2",
"rollup-plugin-polyfill-node": "^0.12.0",
"storybook": "^7.6.1",
"storybook-dark-mode": "^3.0.3",
"storybook": "^8.0.9",
"storybook-dark-mode": "^4.0.1",
"storybook-react-router": "^1.0.8",
"stylelint": "^14.16.1",
"stylelint-config-recommended-scss": "^7.0.0",
Expand Down
Loading

0 comments on commit 4e2eb3c

Please sign in to comment.