From 0f936ec0e7606cb79434d94096b6e113a7ce78eb Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Fri, 15 Dec 2023 18:35:16 +0100
Subject: refactor(stories): migrate stories to CSF3 format

---
 .storybook/preview.tsx | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

(limited to '.storybook/preview.tsx')

diff --git a/.storybook/preview.tsx b/.storybook/preview.tsx
index f36013c..47ea5a8 100644
--- a/.storybook/preview.tsx
+++ b/.storybook/preview.tsx
@@ -1,6 +1,6 @@
 import type { Decorator, Preview } from '@storybook/react';
 import { useDarkMode } from 'storybook-dark-mode';
-import { FC, ReactNode, useEffect } from 'react';
+import React, { FC, ReactNode, useEffect } from 'react';
 import { IntlProvider } from 'react-intl';
 import {
   AckeeProvider,
@@ -9,10 +9,10 @@ import {
   ThemeProvider,
 } from '../src/utils/providers';
 import '../src/styles/globals.scss';
-import { DocsContainer } from './overrides/docs-container';
 import dark from './themes/dark';
 import light from './themes/light';
 import { useTheme } from '../src/utils/hooks';
+import { DocsContainer } from '@storybook/blocks';
 
 type ThemeWrapperProps = {
   children: ReactNode;
@@ -77,7 +77,13 @@ const preview: Preview = {
       stylePreview: true,
     },
     docs: {
-      container: DocsContainer,
+      container: ({ children, context }) => {
+        return (
+          <DocsContainer context={context} theme={useDarkMode() ? dark : light}>
+            {children}
+          </DocsContainer>
+        );
+      },
     },
   },
 };
-- 
cgit v1.2.3

